diff mbox series

[v4,3/3] ARM: dts: lan966x: Add UDPHS support

Message ID 20220701070928.459135-4-herve.codina@bootlin.com (mailing list archive)
State Superseded
Headers show
Series Microchip LAN966x USB device support | expand

Commit Message

Herve Codina July 1, 2022, 7:09 a.m. UTC
Add UDPHS (the USB High Speed Device Port controller) support.

The both lan966x SOCs (LAN9662 and LAN9668) have the same UDPHS
IP. This IP is also the same as the one present in the SAMA5D3
SOC.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 arch/arm/boot/dts/lan966x.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Claudiu Beznea July 1, 2022, 10:56 a.m. UTC | #1
On 01.07.2022 10:09, Herve Codina wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Add UDPHS (the USB High Speed Device Port controller) support.
> 
> The both lan966x SOCs (LAN9662 and LAN9668) have the same UDPHS
> IP. This IP is also the same as the one present in the SAMA5D3
> SOC.
> 
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> ---
>  arch/arm/boot/dts/lan966x.dtsi | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/lan966x.dtsi b/arch/arm/boot/dts/lan966x.dtsi
> index 3cb02fffe716..c98e7075c2b4 100644
> --- a/arch/arm/boot/dts/lan966x.dtsi
> +++ b/arch/arm/boot/dts/lan966x.dtsi
> @@ -458,6 +458,17 @@ cpu_ctrl: syscon@e00c0000 {
>                         reg = <0xe00c0000 0x350>;
>                 };
> 
> +               udc: usb@e0808000 {
> +                       compatible = "microchip,lan9662-udc",
> +                                    "atmel,sama5d3-udc";
> +                       reg = <0x00200000 0x80000>,
> +                             <0xe0808000 0x400>;
> +                       interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
> +                       clocks = <&clks GCK_GATE_UDPHS>, <&nic_clk>;
> +                       clock-names = "pclk", "hclk";
> +                       status = "disabled";
> +               };
> +

I have these compilation warnings:

  DTC     arch/arm/boot/dts/lan966x-pcb8291.dtb
arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
/soc/usb@e0808000: simple-bus unit address format error, expected "200000"
  DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dtb
arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
/soc/usb@e0808000: simple-bus unit address format error, expected "200000"
  DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dtb
arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
/soc/usb@e0808000: simple-bus unit address format error, expected "200000"

>                 can0: can@e081c000 {
>                         compatible = "bosch,m_can";
>                         reg = <0xe081c000 0xfc>, <0x00100000 0x4000>;
> --
> 2.35.3
>
Herve Codina July 1, 2022, 2:03 p.m. UTC | #2
Hi Claudiu,

On Fri, 1 Jul 2022 10:56:46 +0000
<Claudiu.Beznea@microchip.com> wrote:

> On 01.07.2022 10:09, Herve Codina wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > Add UDPHS (the USB High Speed Device Port controller) support.
> > 
> > The both lan966x SOCs (LAN9662 and LAN9668) have the same UDPHS
> > IP. This IP is also the same as the one present in the SAMA5D3
> > SOC.
> > 
> > Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> > ---
> >  arch/arm/boot/dts/lan966x.dtsi | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/lan966x.dtsi b/arch/arm/boot/dts/lan966x.dtsi
> > index 3cb02fffe716..c98e7075c2b4 100644
> > --- a/arch/arm/boot/dts/lan966x.dtsi
> > +++ b/arch/arm/boot/dts/lan966x.dtsi
> > @@ -458,6 +458,17 @@ cpu_ctrl: syscon@e00c0000 {
> >                         reg = <0xe00c0000 0x350>;
> >                 };
> > 
> > +               udc: usb@e0808000 {
> > +                       compatible = "microchip,lan9662-udc",
> > +                                    "atmel,sama5d3-udc";
> > +                       reg = <0x00200000 0x80000>,
> > +                             <0xe0808000 0x400>;
> > +                       interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
> > +                       clocks = <&clks GCK_GATE_UDPHS>, <&nic_clk>;
> > +                       clock-names = "pclk", "hclk";
> > +                       status = "disabled";
> > +               };
> > +  
> 
> I have these compilation warnings:
> 
>   DTC     arch/arm/boot/dts/lan966x-pcb8291.dtb
> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
>   DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dtb
> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
>   DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dtb
> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"

I am a bit confused but these warnings do not appear on my side (patches
based on v5.19-rc1).
What is the exact command that leads to these warning ?

Thanks,
Hervé
Claudiu Beznea July 4, 2022, 5:39 a.m. UTC | #3
Hi, Herve,

On 01.07.2022 17:03, Herve Codina wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Hi Claudiu,>
> On Fri, 1 Jul 2022 10:56:46 +0000
> <Claudiu.Beznea@microchip.com> wrote:
> 
>> On 01.07.2022 10:09, Herve Codina wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> Add UDPHS (the USB High Speed Device Port controller) support.
>>>
>>> The both lan966x SOCs (LAN9662 and LAN9668) have the same UDPHS
>>> IP. This IP is also the same as the one present in the SAMA5D3
>>> SOC.
>>>
>>> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
>>> ---
>>>  arch/arm/boot/dts/lan966x.dtsi | 11 +++++++++++
>>>  1 file changed, 11 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/lan966x.dtsi b/arch/arm/boot/dts/lan966x.dtsi
>>> index 3cb02fffe716..c98e7075c2b4 100644
>>> --- a/arch/arm/boot/dts/lan966x.dtsi
>>> +++ b/arch/arm/boot/dts/lan966x.dtsi
>>> @@ -458,6 +458,17 @@ cpu_ctrl: syscon@e00c0000 {
>>>                         reg = <0xe00c0000 0x350>;
>>>                 };
>>>
>>> +               udc: usb@e0808000 {
>>> +                       compatible = "microchip,lan9662-udc",
>>> +                                    "atmel,sama5d3-udc";
>>> +                       reg = <0x00200000 0x80000>,
>>> +                             <0xe0808000 0x400>;
>>> +                       interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
>>> +                       clocks = <&clks GCK_GATE_UDPHS>, <&nic_clk>;
>>> +                       clock-names = "pclk", "hclk";
>>> +                       status = "disabled";
>>> +               };
>>> +
>>
>> I have these compilation warnings:
>>
>>   DTC     arch/arm/boot/dts/lan966x-pcb8291.dtb
>> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
>> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
>>   DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dtb
>> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
>> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
>>   DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dtb
>> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
>> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
> 
> I am a bit confused but these warnings do not appear on my side (patches
> based on v5.19-rc1).
> What is the exact command that leads to these warning ?

Have you tried with CONFIG_SOC_LAN966 enabled?

Thank you,
Claudiu Beznea

> 
> Thanks,
> Hervé
> 
> --
> Hervé Codina, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Claudiu Beznea July 4, 2022, 5:41 a.m. UTC | #4
On 01.07.2022 17:03, Herve Codina wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Hi Claudiu,
> 
> On Fri, 1 Jul 2022 10:56:46 +0000
> <Claudiu.Beznea@microchip.com> wrote:
> 
>> On 01.07.2022 10:09, Herve Codina wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> Add UDPHS (the USB High Speed Device Port controller) support.
>>>
>>> The both lan966x SOCs (LAN9662 and LAN9668) have the same UDPHS
>>> IP. This IP is also the same as the one present in the SAMA5D3
>>> SOC.
>>>
>>> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
>>> ---
>>>  arch/arm/boot/dts/lan966x.dtsi | 11 +++++++++++
>>>  1 file changed, 11 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/lan966x.dtsi b/arch/arm/boot/dts/lan966x.dtsi
>>> index 3cb02fffe716..c98e7075c2b4 100644
>>> --- a/arch/arm/boot/dts/lan966x.dtsi
>>> +++ b/arch/arm/boot/dts/lan966x.dtsi
>>> @@ -458,6 +458,17 @@ cpu_ctrl: syscon@e00c0000 {
>>>                         reg = <0xe00c0000 0x350>;
>>>                 };
>>>
>>> +               udc: usb@e0808000 {
>>> +                       compatible = "microchip,lan9662-udc",
>>> +                                    "atmel,sama5d3-udc";
>>> +                       reg = <0x00200000 0x80000>,
>>> +                             <0xe0808000 0x400>;
>>> +                       interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
>>> +                       clocks = <&clks GCK_GATE_UDPHS>, <&nic_clk>;
>>> +                       clock-names = "pclk", "hclk";
>>> +                       status = "disabled";
>>> +               };
>>> +
>>
>> I have these compilation warnings:
>>
>>   DTC     arch/arm/boot/dts/lan966x-pcb8291.dtb
>> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
>> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
>>   DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dtb
>> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
>> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
>>   DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dtb
>> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
>> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
> 
> I am a bit confused but these warnings do not appear on my side (patches
> based on v5.19-rc1).
> What is the exact command that leads to these warning ?

Oh, and the set of commands I'm using:
make sama7_defconfig
make menuconfig + enable CONFIG_SOC_LAN966
make W=1 dtbs

> 
> Thanks,
> Hervé
> 
> --
> Hervé Codina, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Herve Codina July 4, 2022, 10:19 a.m. UTC | #5
Hi Claudiu,

On Mon, 4 Jul 2022 05:41:33 +0000
<Claudiu.Beznea@microchip.com> wrote:

> On 01.07.2022 17:03, Herve Codina wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > Hi Claudiu,
> > 
> > On Fri, 1 Jul 2022 10:56:46 +0000
> > <Claudiu.Beznea@microchip.com> wrote:
> >   
> >> On 01.07.2022 10:09, Herve Codina wrote:  
> >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >>>
> >>> Add UDPHS (the USB High Speed Device Port controller) support.
> >>>
> >>> The both lan966x SOCs (LAN9662 and LAN9668) have the same UDPHS
> >>> IP. This IP is also the same as the one present in the SAMA5D3
> >>> SOC.
> >>>
> >>> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> >>> ---
> >>>  arch/arm/boot/dts/lan966x.dtsi | 11 +++++++++++
> >>>  1 file changed, 11 insertions(+)
> >>>
> >>> diff --git a/arch/arm/boot/dts/lan966x.dtsi b/arch/arm/boot/dts/lan966x.dtsi
> >>> index 3cb02fffe716..c98e7075c2b4 100644
> >>> --- a/arch/arm/boot/dts/lan966x.dtsi
> >>> +++ b/arch/arm/boot/dts/lan966x.dtsi
> >>> @@ -458,6 +458,17 @@ cpu_ctrl: syscon@e00c0000 {
> >>>                         reg = <0xe00c0000 0x350>;
> >>>                 };
> >>>
> >>> +               udc: usb@e0808000 {
> >>> +                       compatible = "microchip,lan9662-udc",
> >>> +                                    "atmel,sama5d3-udc";
> >>> +                       reg = <0x00200000 0x80000>,
> >>> +                             <0xe0808000 0x400>;
> >>> +                       interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
> >>> +                       clocks = <&clks GCK_GATE_UDPHS>, <&nic_clk>;
> >>> +                       clock-names = "pclk", "hclk";
> >>> +                       status = "disabled";
> >>> +               };
> >>> +  
> >>
> >> I have these compilation warnings:
> >>
> >>   DTC     arch/arm/boot/dts/lan966x-pcb8291.dtb
> >> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
> >> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
> >>   DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dtb
> >> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
> >> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"
> >>   DTC     arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dtb
> >> arch/arm/boot/dts/lan966x.dtsi:461.21-470.5: Warning (simple_bus_reg):
> >> /soc/usb@e0808000: simple-bus unit address format error, expected "200000"  
> > 
> > I am a bit confused but these warnings do not appear on my side (patches
> > based on v5.19-rc1).
> > What is the exact command that leads to these warning ?  
> 
> Oh, and the set of commands I'm using:
> make sama7_defconfig
> make menuconfig + enable CONFIG_SOC_LAN966
> make W=1 dtbs

I have the warnings.
They are present with 'W=1' set.

I remove them and send a v5.

Thanks,
Hervé
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/lan966x.dtsi b/arch/arm/boot/dts/lan966x.dtsi
index 3cb02fffe716..c98e7075c2b4 100644
--- a/arch/arm/boot/dts/lan966x.dtsi
+++ b/arch/arm/boot/dts/lan966x.dtsi
@@ -458,6 +458,17 @@  cpu_ctrl: syscon@e00c0000 {
 			reg = <0xe00c0000 0x350>;
 		};
 
+		udc: usb@e0808000 {
+			compatible = "microchip,lan9662-udc",
+				     "atmel,sama5d3-udc";
+			reg = <0x00200000 0x80000>,
+			      <0xe0808000 0x400>;
+			interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clks GCK_GATE_UDPHS>, <&nic_clk>;
+			clock-names = "pclk", "hclk";
+			status = "disabled";
+		};
+
 		can0: can@e081c000 {
 			compatible = "bosch,m_can";
 			reg = <0xe081c000 0xfc>, <0x00100000 0x4000>;