Message ID | 20240716-a38x-utmi-phy-v2-2-dae3a9c6ca3e@solid-run.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | phy: mvebu-cp110-utmi: add support for armada-380 utmi phys | expand |
On 16/07/2024 22:52, Josua Mayer wrote: > Armada 38x has 3x USB-2.0 utmi phys. They are almost identical to the 2x > utmi phys on armada 8k. > > Add descriptions for all 3 phy ports. > > Signed-off-by: Josua Mayer <josua@solid-run.com> > --- > arch/arm/boot/dts/marvell/armada-38x.dtsi | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/arch/arm/boot/dts/marvell/armada-38x.dtsi b/arch/arm/boot/dts/marvell/armada-38x.dtsi > index 446861b6b17b..701a1c0c19ad 100644 > --- a/arch/arm/boot/dts/marvell/armada-38x.dtsi > +++ b/arch/arm/boot/dts/marvell/armada-38x.dtsi > @@ -392,6 +392,11 @@ comphy5: phy@5 { > }; > }; > > + syscon0: system-controller@18400 { > + compatible = "syscon", "simple-mfd"; That's not a valid pair. They cannot be alone. Best regards, Krzysztof
Am 17.07.24 um 14:04 schrieb Krzysztof Kozlowski: > On 16/07/2024 22:52, Josua Mayer wrote: >> Armada 38x has 3x USB-2.0 utmi phys. They are almost identical to the 2x >> utmi phys on armada 8k. >> >> Add descriptions for all 3 phy ports. >> >> Signed-off-by: Josua Mayer <josua@solid-run.com> >> --- >> arch/arm/boot/dts/marvell/armada-38x.dtsi | 29 +++++++++++++++++++++++++++++ >> 1 file changed, 29 insertions(+) >> >> diff --git a/arch/arm/boot/dts/marvell/armada-38x.dtsi b/arch/arm/boot/dts/marvell/armada-38x.dtsi >> index 446861b6b17b..701a1c0c19ad 100644 >> --- a/arch/arm/boot/dts/marvell/armada-38x.dtsi >> +++ b/arch/arm/boot/dts/marvell/armada-38x.dtsi >> @@ -392,6 +392,11 @@ comphy5: phy@5 { >> }; >> }; >> >> + syscon0: system-controller@18400 { >> + compatible = "syscon", "simple-mfd"; > That's not a valid pair. They cannot be alone. Curious! I have seen it in armada-cp11x.dtsi. However this is my mistake, especially since with v2 the syscon node is not actually used. sincerely Josua Mayer
On 20/07/2024 15:19, Josua Mayer wrote: > Am 17.07.24 um 14:04 schrieb Krzysztof Kozlowski: >> On 16/07/2024 22:52, Josua Mayer wrote: >>> Armada 38x has 3x USB-2.0 utmi phys. They are almost identical to the 2x >>> utmi phys on armada 8k. >>> >>> Add descriptions for all 3 phy ports. >>> >>> Signed-off-by: Josua Mayer <josua@solid-run.com> >>> --- >>> arch/arm/boot/dts/marvell/armada-38x.dtsi | 29 +++++++++++++++++++++++++++++ >>> 1 file changed, 29 insertions(+) >>> >>> diff --git a/arch/arm/boot/dts/marvell/armada-38x.dtsi b/arch/arm/boot/dts/marvell/armada-38x.dtsi >>> index 446861b6b17b..701a1c0c19ad 100644 >>> --- a/arch/arm/boot/dts/marvell/armada-38x.dtsi >>> +++ b/arch/arm/boot/dts/marvell/armada-38x.dtsi >>> @@ -392,6 +392,11 @@ comphy5: phy@5 { >>> }; >>> }; >>> >>> + syscon0: system-controller@18400 { >>> + compatible = "syscon", "simple-mfd"; >> That's not a valid pair. They cannot be alone. > Curious! I have seen it in armada-cp11x.dtsi. Old code, I don't think anyone is working on armada and other Marvell chips, so by copying old code you will copy bugs or wrong designs. I can only suggest to work on recent platform where such oddities are fixed... Best regards, Krzysztof
On Sat, Jul 20, 2024 at 08:23:09PM +0200, Krzysztof Kozlowski wrote: > On 20/07/2024 15:19, Josua Mayer wrote: > > Am 17.07.24 um 14:04 schrieb Krzysztof Kozlowski: > >> On 16/07/2024 22:52, Josua Mayer wrote: > >>> Armada 38x has 3x USB-2.0 utmi phys. They are almost identical to the 2x > >>> utmi phys on armada 8k. > >>> > >>> Add descriptions for all 3 phy ports. > >>> > >>> Signed-off-by: Josua Mayer <josua@solid-run.com> > >>> --- > >>> arch/arm/boot/dts/marvell/armada-38x.dtsi | 29 +++++++++++++++++++++++++++++ > >>> 1 file changed, 29 insertions(+) > >>> > >>> diff --git a/arch/arm/boot/dts/marvell/armada-38x.dtsi b/arch/arm/boot/dts/marvell/armada-38x.dtsi > >>> index 446861b6b17b..701a1c0c19ad 100644 > >>> --- a/arch/arm/boot/dts/marvell/armada-38x.dtsi > >>> +++ b/arch/arm/boot/dts/marvell/armada-38x.dtsi > >>> @@ -392,6 +392,11 @@ comphy5: phy@5 { > >>> }; > >>> }; > >>> > >>> + syscon0: system-controller@18400 { > >>> + compatible = "syscon", "simple-mfd"; > >> That's not a valid pair. They cannot be alone. > > Curious! I have seen it in armada-cp11x.dtsi. > > Old code, I don't think anyone is working on armada and other Marvell > chips, so by copying old code you will copy bugs or wrong designs. I can > only suggest to work on recent platform where such oddities are fixed... As you say, these are old platform. I'm not sure they are actually buggy or wrong design, it is more that current day best practice is different to the best practice back then. This was from before the time linting tools and .yaml existed for DT. The kirkwood-b3.dts i wrote in 2013 still works, my NAS box gets its kernel updated about once a year, and a new disk about every 8 years. These systems can keep running for a long time. We have to accept there will be legacy DT. Andrew
diff --git a/arch/arm/boot/dts/marvell/armada-38x.dtsi b/arch/arm/boot/dts/marvell/armada-38x.dtsi index 446861b6b17b..701a1c0c19ad 100644 --- a/arch/arm/boot/dts/marvell/armada-38x.dtsi +++ b/arch/arm/boot/dts/marvell/armada-38x.dtsi @@ -392,6 +392,11 @@ comphy5: phy@5 { }; }; + syscon0: system-controller@18400 { + compatible = "syscon", "simple-mfd"; + reg = <0x18420 0x30>; + }; + coreclk: mvebu-sar@18600 { compatible = "marvell,armada-380-core-clock"; reg = <0x18600 0x04>; @@ -580,6 +585,30 @@ ahci0: sata@a8000 { status = "disabled"; }; + utmi: utmi@c0000 { + compatible = "marvell,a38x-utmi-phy"; + reg = <0xc0000 0x6000>, <0x18420 4>, <0x18440 12>; + reg-names = "utmi", "usb-cfg", "utmi-cfg"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + utmi0: usb-phy@0 { + reg = <0>; + #phy-cells = <0>; + }; + + utmi1: usb-phy@1 { + reg = <1>; + #phy-cells = <0>; + }; + + utmi2: usb-phy@2 { + reg = <2>; + #phy-cells = <0>; + }; + }; + bm: bm@c8000 { compatible = "marvell,armada-380-neta-bm"; reg = <0xc8000 0xac>;
Armada 38x has 3x USB-2.0 utmi phys. They are almost identical to the 2x utmi phys on armada 8k. Add descriptions for all 3 phy ports. Signed-off-by: Josua Mayer <josua@solid-run.com> --- arch/arm/boot/dts/marvell/armada-38x.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)