lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bbb5c223-d75b-4adb-9930-a67126c16605@solid-run.com>
Date: Tue, 16 Jul 2024 12:55:37 +0000
From: Josua Mayer <josua@...id-run.com>
To: Vinod Koul <vkoul@...nel.org>, Kishon Vijay Abraham I <kishon@...nel.org>,
	Andrew Lunn <andrew@...n.ch>, Gregory Clement <gregory.clement@...tlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>, Rob Herring
	<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
	<conor+dt@...nel.org>
CC: Yazan Shhady <yazan.shhady@...id-run.com>, "linux-phy@...ts.infradead.org"
	<linux-phy@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>
Subject: Re: [PATCH RFC 2/2] arm: dts: marvell: armada-38x: add description
 for usb phys

Am 15.07.24 um 19:47 schrieb Josua Mayer:
> 3. utmi phy driver access just three registers using syscon: all-ports
>    power-up (probably enables clocks), device-mode mux, per-port power-up.
>
>    Assign these registers individually to the phy device-node, and
>    implement access in driver when syscon is not available.
>
>    If this is preferred, which dt property should s[ecify their address?
>    reg, ranges, ...?

I think I have my answer, with reg-names it seems manageable -
please see the example below:

            utmi: utmi@...00 {
                compatible = "marvell,armada-380-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>;
                };
            };

If registers named "usb-cfg" and "utmi-cfg" are given, the driver can be extended
to optionally use those.

I have tested on armada-388-clearfog-pro,
and will send a v2 after tidying up my changes:

/* USB-2.0 Host, CON3 - nearest power */
&usb0 {
    phys = <&utmi0>;
    phy-names = "utmi";
    status = "okay";
};

/* USB-2.0 Host, CON2 - nearest CPU */
&usb3_0 {
    phys = <&utmi1>;
    phy-names = "utmi";
    status = "okay";
};

/* SRDS #3 - USB-2.0/3.0 Host, Type-A connector */
&usb3_1 {
    phys = <&utmi2>;
    phy-names = "utmi";
    status = "okay";
};

&utmi {
    status = "okay";
};

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ