ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
Subsystems (2)
PATCH v2 1/1 ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
Describe the PCI USB devices that are behind the PCI bridges, adding necessary links to the USB PHY device.
Based on the original work by Ben Dooks <[email protected]>.
---
This patch is against 'renesas-devel-v3.15-rc7-20140526' tag of Simon Horman's 'renesas.git' repo plus R8A7790/Lager PCI and USB PHY support patches posted before. The patch requires the internal PCI DT support, USB PHY driver, and USB HCD generic PHY support (also already posted) in order to work.
Changes in version 2:
- renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
- changed the PHY specifier in the PCI#2 node to reflect that channel #1 support was dropped;
- resolved rejects, refreshed the patch.
arch/arm/boot/dts/r8a7790.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +28 -0
@@ -919,6 +919,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>; + + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; }; pci1: pci at ee0b0000 {
@@ -955,5 +969,19 @@ interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>; + + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; }; };
PATCH v2 1/1 ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
Quoted 57 lines · Sergei Shtylyov
Describe the PCI USB devices that are behind the PCI bridges, adding necessary links to the USB PHY device.
Based on the original work by Ben Dooks <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against 'renesas-devel-v3.15-rc7-20140526' tag of Simon Horman's 'renesas.git' repo plus R8A7790/Lager PCI and USB PHY support patches posted before. The patch requires the internal PCI DT support, USB PHY driver, and USB HCD generic PHY support (also already posted) in order to work.Changes in version 2:
- renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
- changed the PHY specifier in the PCI#2 node to reflect that channel #1 support was dropped;
- resolved rejects, refreshed the patch.arch/arm/boot/dts/r8a7790.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)Index:
renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================arch/arm/boot/dts/r8a7790.dtsi +20
-0@@ -919,6 +919,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>; + + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; }; pci1: pci at ee0b0000 {@@ -955,5 +969,19 @@ interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>; + + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb";
arch/arm/boot/dts/r8a7790.dtsi line 987
Quoted 10 lines
arch/arm/boot/dts/r8a7790.dtsi +8
-0+ }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; }; };
Hi Sergei,
Above I see two hunks of DTS code but my r8a7790 data sheet contains three USB PCI devices. Perhaps my understanding is wrong, or may there is some other patch available to enable all USB PCI devices included in the SoC?
Thanks,
/ magnus
PATCH v2 1/1 ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
Hello.
Quoted 70 lines · Magnus Damm
Quoted 57 lines
Describe the PCI USB devices that are behind the PCI bridges, adding necessary links to the USB PHY device.
Based on the original work by Ben Dooks <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against 'renesas-devel-v3.15-rc7-20140526' tag of Simon Horman's 'renesas.git' repo plus R8A7790/Lager PCI and USB PHY support patches posted before. The patch requires the internal PCI DT support, USB PHY driver, and USB HCD generic PHY support (also already posted) in order to work.Changes in version 2:
- renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
- changed the PHY specifier in the PCI#2 node to reflect that channel #1 support was dropped;
- resolved rejects, refreshed the patch.arch/arm/boot/dts/r8a7790.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)Index:
renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================arch/arm/boot/dts/r8a7790.dtsi +20
-0@@ -919,6 +919,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>; + + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; }; pci1: pci at ee0b0000 {@@ -955,5 +969,19 @@ interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>; + + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb";arch/arm/boot/dts/r8a7790.dtsi line 987
Quoted 10 lines
arch/arm/boot/dts/r8a7790.dtsi +8
-0+ }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; }; };Hi Sergei,
Quoted 2 lines
Above I see two hunks of DTS code but my r8a7790 data sheet contains three USB PCI devices. Perhaps my understanding is wrong, or may there
You probably wanted to say 6 (OHCI and EHCI are 2 different PCI devices).
Quoted 2 lines
is some other patch available to enable all USB PCI devices included in the SoC?
This patch doesn't enable USB devices, it just links them to the PHY where
it makes sense (for USB channel #1 it doesn't).
Quoted 2 lines
Thanks,
/ magnus
WBR, Sergei
PATCH v2 1/1 ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
Quoted 91 lines · Sergei Shtylyov
Quoted 87 lines · Magnus Damm
Quoted 74 lines
Describe the PCI USB devices that are behind the PCI bridges, adding necessary
links to the USB PHY device.Based on the original work by Ben Dooks <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against 'renesas-devel-v3.15-rc7-20140526' tag of Simon Horman's
'renesas.git' repo plus R8A7790/Lager PCI and USB PHY support patches posted
before. The patch requires the internal PCI DT support, USB PHY driver, and
USB HCD generic PHY support (also already posted) in order to work.Changes in version 2:
- renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
- changed the PHY specifier in the PCI#2 node to reflect that channel #1 support
was dropped;
- resolved rejects, refreshed the patch.arch/arm/boot/dts/r8a7790.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)Index:
renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================arch/arm/boot/dts/r8a7790.dtsi +0
-0@@ -919,6 +919,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 108
IRQ_TYPE_LEVEL_HIGH0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 108
IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/r8a7790.dtsi +14
-0+ + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; }; pci1: pci at ee0b0000 {@@ -955,5 +969,19 @@ interrupt-map = <0x0000 0 0 1 &gic 0 113
IRQ_TYPE_LEVEL_HIGH0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 113
IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/r8a7790.dtsi +6
-0+ + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb";arch/arm/boot/dts/r8a7790.dtsi line 987
Quoted 10 lines
arch/arm/boot/dts/r8a7790.dtsi +8
-0+ }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; }; };Hi Sergei,
Quoted 5 lines
Quoted 2 lines
Above I see two hunks of DTS code but my r8a7790 data sheet contains three USB PCI devices. Perhaps my understanding is wrong, or may there
You probably wanted to say 6 (OHCI and EHCI are 2 different PCI devices).
Sure. I guess it depends on if you count PCI host controllers or USB host controllers..
Quoted 6 lines
Quoted 2 lines
is some other patch available to enable all USB PCI devices included in the SoC?
This patch doesn't enable USB devices, it just links them to the PHY
where it makes sense (for USB channel #1 it doesn't).
I know we've discussed this before, and for USB channel #1 you tend to say that the PHY is not necessary for operation. From my side I am not so sure. Over the months I seen several shortcuts and missing pieces so for now just assume this is another rushed attempt. As usual I would like to make sure the dependencies are correctly described in DT before merging anything.
Like I mentioned earlier there are shared bits in UGCTRL register in the PHY. Those may or may not affect USB channel #1. Furthermore, on top of this we have the MSTP bit for the PHY that may or may not be related to USB channel #1.
My opinion is that if the USB PHY requires the MSTP clock to be enabled when using USB channel #1 _or_ the UGCTRL bits affect the USB Channel #1 then DT needs to point out the relationship between the PHY and the USB Host so Runtime PM can be used in the PHY driver to dynamically manage the clock.
Thanks,
/ magnus
PATCH v2 1/1 ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
Hello.
Quoted 81 lines · Magnus Damm
Quoted 80 lines
Quoted 80 lines
Quoted 68 lines
Describe the PCI USB devices that are behind the PCI bridges, adding necessary
links to the USB PHY device.Based on the original work by Ben Dooks <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against 'renesas-devel-v3.15-rc7-20140526' tag of Simon Horman's
'renesas.git' repo plus R8A7790/Lager PCI and USB PHY support patches posted
before. The patch requires the internal PCI DT support, USB PHY driver, and
USB HCD generic PHY support (also already posted) in order to work.Changes in version 2:
- renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
- changed the PHY specifier in the PCI#2 node to reflect that channel #1 supportwas dropped;- resolved rejects, refreshed the patch.
arch/arm/boot/dts/r8a7790.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)Index:
renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================arch/arm/boot/dts/r8a7790.dtsi +0
-0@@ -919,6 +919,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 108
IRQ_TYPE_LEVEL_HIGH0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 108
IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/r8a7790.dtsi +14
-0+ + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; }; pci1: pci at ee0b0000 {@@ -955,5 +969,19 @@ interrupt-map = <0x0000 0 0 1 &gic 0 113
IRQ_TYPE_LEVEL_HIGH0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 113
IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/r8a7790.dtsi +6
-0+ + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb";arch/arm/boot/dts/r8a7790.dtsi line 987
Quoted 10 lines
arch/arm/boot/dts/r8a7790.dtsi +8
-0+ }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; }; };Hi Sergei,
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Above I see two hunks of DTS code but my r8a7790 data sheet contains three USB PCI devices. Perhaps my understanding is wrong, or may there
You probably wanted to say 6 (OHCI and EHCI are 2 different PCI devices).
Sure. I guess it depends on if you count PCI host controllers or USB host controllers..
You said "USB PCI devices", so I thought you meant the latter.
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
is some other patch available to enable all USB PCI devices included in the SoC?
This patch doesn't enable USB devices, it just links them to the PHY
where it makes sense (for USB channel #1 it doesn't).
Quoted 8 lines
I know we've discussed this before, and for USB channel #1 you tend to say that the PHY is not necessary for operation. From my side I am not so sure. Over the months I seen several shortcuts and missing pieces so for now just assume this is another rushed attempt. As usual I would like to make sure the dependencies are correctly described in DT before merging anything.
Like I mentioned earlier there are shared bits in UGCTRL register in
Did you mean UGCTRL or UGCTRL2 register? My testing didn't prove that the
UGCTRL bits (CONNECT and PLLRESET) affect anything but the USBHS controller -- my PHY driver only touches these bits if the PHY selected corresponds to the USBHS itself (which is not supported by DT yet)...
Quoted 3 lines
the PHY. Those may or may not affect USB channel #1. Furthermore, on top of this we have the MSTP bit for the PHY that may or may not be related to USB channel #1.
There is no MSTP bit for the PHY, there's MSTP bit for USBHS controller of
which this PHY is a part.
Quoted 4 lines
My opinion is that if the USB PHY requires the MSTP clock to be enabled when using USB channel #1 _or_ the UGCTRL bits affect the USB Channel #1 then DT needs to point out the relationship between the PHY and the USB Host
I agree and I can conduct some additional tests only linking the USB
channel #1 to the PHY driver, and hence enabling the USBHS clock only for it...
Quoted 2 lines
so Runtime PM can be used in the PHY driver to
dynamically manage the clock.
Er, do you insist on using the runtime PM vs clock API? I'm not yet sure
it'll work with a named clock...
Quoted 2 lines
Thanks,
/ magnus
WBR, Sergei
PATCH v2 1/1 ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
Hello.
Quoted 78 lines · Sergei Shtylyov
Quoted 78 lines
Quoted 78 lines
Quoted 78 lines
Quoted 78 lines
Describe the PCI USB devices that are behind the PCI bridges, adding necessary
links to the USB PHY device.Based on the original work by Ben Dooks <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against 'renesas-devel-v3.15-rc7-20140526' tag of Simon Horman's
'renesas.git' repo plus R8A7790/Lager PCI and USB PHY support patches posted
before. The patch requires the internal PCI DT support, USB PHY driver, and
USB HCD generic PHY support (also already posted) in order to work.Changes in version 2:
- renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
- changed the PHY specifier in the PCI#2 node to reflect that channel #1 supportwas dropped;- resolved rejects, refreshed the patch.
arch/arm/boot/dts/r8a7790.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)Index:
renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================arch/arm/boot/dts/r8a7790.dtsi +0
-0@@ -919,6 +919,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 108
IRQ_TYPE_LEVEL_HIGH0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 108
IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/r8a7790.dtsi +14
-0+ + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; }; pci1: pci at ee0b0000 {@@ -955,5 +969,19 @@ interrupt-map = <0x0000 0 0 1 &gic 0 113
IRQ_TYPE_LEVEL_HIGH0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 113
IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/r8a7790.dtsi +14
-0+ + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; }; };
[...]
Quoted 21 lines
Quoted 8 lines
I know we've discussed this before, and for USB channel #1 you tend to say that the PHY is not necessary for operation. From my side I am not so sure. Over the months I seen several shortcuts and missing pieces so for now just assume this is another rushed attempt. As usual I would like to make sure the dependencies are correctly described in DT before merging anything.
Like I mentioned earlier there are shared bits in UGCTRL register in
Did you mean UGCTRL or UGCTRL2 register? My testing didn't prove that the
UGCTRL bits (CONNECT and PLLRESET) affect anything but the USBHS controller -- my PHY driver only touches these bits if the PHY selected corresponds to the USBHS itself (which is not supported by DT yet)...Quoted 3 lines
the PHY. Those may or may not affect USB channel #1. Furthermore, on top of this we have the MSTP bit for the PHY that may or may not be related to USB channel #1.
There is no MSTP bit for the PHY, there's MSTP bit for USBHS controller of
which this PHY is a part.
Quoted 7 lines
Quoted 4 lines
My opinion is that if the USB PHY requires the MSTP clock to be enabled when using USB channel #1 _or_ the UGCTRL bits affect the USB Channel #1 then DT needs to point out the relationship between the PHY and the USB Host
I agree and I can conduct some additional tests only linking the USB
channel #1 to the PHY driver, and hence enabling the USBHS clock only for it...
OK, I've done additional testing and USB channel #1 on R8A7790 works
regardless of the USBHS clock being enabled or not.
Quoted 2 lines
Quoted 2 lines
Thanks,
/ magnus
WBR, Sergei
PATCH v2 1/1 ARM: shmobile: r8a7790: link PCI USB devices to USB PHY
Quoted 133 lines · Sergei Shtylyov
Hello.
Quoted 87 lines · Sergei Shtylyov
Quoted 87 lines
Quoted 87 lines
Quoted 87 lines
Quoted 87 lines
Describe the PCI USB devices that are behind the PCI bridges, adding necessary
links to the USB PHY device.Based on the original work by Ben Dooks <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>---
This patch is against 'renesas-devel-v3.15-rc7-20140526' tag of Simon Horman's
'renesas.git' repo plus R8A7790/Lager PCI and USB PHY support patches posted
before. The patch requires the internal PCI DT support, USB PHY driver,
and
USB HCD generic PHY support (also already posted) in order to work.Changes in version 2:
- renamed the PCI OHCI/EHCI device nodes to comply with the PCI binding;
- changed the PHY specifier in the PCI#2 node to reflect that channel #1
supportwas dropped;- resolved rejects, refreshed the patch.
arch/arm/boot/dts/r8a7790.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)Index:
renesas/arch/arm/boot/dts/r8a7790.dtsi
===================================================================arch/arm/boot/dts/r8a7790.dtsi +0
-0@@ -919,6 +919,20 @@ interrupt-map = <0x0000 0 0 1 &gic 0 108
IRQ_TYPE_LEVEL_HIGH0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 108
IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/r8a7790.dtsi +14
-0+ + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 0 0>; + phy-names = "usb"; + }; }; pci1: pci at ee0b0000 {@@ -955,5 +969,19 @@ interrupt-map = <0x0000 0 0 1 &gic 0 113
IRQ_TYPE_LEVEL_HIGH0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH 0x1000 0 0 2 &gic 0 113
IRQ_TYPE_LEVEL_HIGH>;arch/arm/boot/dts/r8a7790.dtsi +14
-0+ + usb at 0,1 { + reg = <0x800 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; + + usb at 0,2 { + reg = <0x1000 0 0 0 0>; + device_type = "pci"; + phys = <&usbphy 1 0>; + phy-names = "usb"; + }; }; };[...]
Quoted 34 lines
Quoted 9 lines
I know we've discussed this before, and for USB channel #1 you tend to say that the PHY is not necessary for operation. From my side I am not so sure. Over the months I seen several shortcuts and missing pieces so for now just assume this is another rushed attempt. As usual I would like to make sure the dependencies are correctly described in DT before merging anything.
Like I mentioned earlier there are shared bits in UGCTRL register in
Did you mean UGCTRL or UGCTRL2 register? My testing didn't prove that
the
UGCTRL bits (CONNECT and PLLRESET) affect anything but the USBHS controller --
my PHY driver only touches these bits if the PHY selected corresponds to the
USBHS itself (which is not supported by DT yet)...Quoted 3 lines
the PHY. Those may or may not affect USB channel #1. Furthermore, on top of this we have the MSTP bit for the PHY that may or may not be related to USB channel #1.
There is no MSTP bit for the PHY, there's MSTP bit for USBHS
controller of
which this PHY is a part.Quoted 4 lines
My opinion is that if the USB PHY requires the MSTP clock to be enabled when using USB channel #1 _or_ the UGCTRL bits affect the USB Channel #1 then DT needs to point out the relationship between the PHY and the USB Host
Quoted 7 lines
Quoted 3 lines
I agree and I can conduct some additional tests only linking the USB
channel #1 to the PHY driver, and hence enabling the USBHS clock only for it...OK, I've done additional testing and USB channel #1 on R8A7790 works
regardless of the USBHS clock being enabled or not.
Thanks for testing! So I suppose this means that we can manage the USB PHY clock used for channel #0 and #2 independently of channel #1?
Cheers,
/ magnus