From: Krzysztof Kozlowski <krzk@kernel.org> To: John Stultz <john.stultz@linaro.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Serge Semin <Sergey.Semin@baikalelectronics.ru>, Felipe Balbi <balbi@kernel.org>, Florian Fainelli <f.fainelli@gmail.com>, Rob Herring <robh+dt@kernel.org>, Wei Xu <xuwei5@hisilicon.com>, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@vger.kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, Serge Semin <fancer.lancer@gmail.com>, lkml <linux-kernel@vger.kernel.org>, YongQin Liu <yongqin.liu@linaro.org>, Amit Pundir <amit.pundir@linaro.org>, Todd Kjos <tkjos@google.com> Subject: Re: [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name Date: Mon, 21 Dec 2020 22:04:23 +0100 [thread overview] Message-ID: <20201221210423.GA2504@kozik-lap> (raw) In-Reply-To: <CALAqxLWAFs+8VKKuMMg2gyfGXgQSjaWv9H5ayuohEK9m6OS3TA@mail.gmail.com> On Mon, Dec 21, 2020 at 12:24:11PM -0800, John Stultz wrote: > On Sat, Dec 19, 2020 at 3:06 AM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On Fri, Dec 18, 2020 at 09:11:42PM -0800, John Stultz wrote: > > > On Wed, Nov 11, 2020 at 1:22 AM Serge Semin > > > <Sergey.Semin@baikalelectronics.ru> wrote: > > > > > > > > In accordance with the DWC USB3 bindings the corresponding node > > > > name is suppose to comply with the Generic USB HCD DT schema, which > > > > requires the USB nodes to have the name acceptable by the regexp: > > > > "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly > > > > named. > > > > > > > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> > > > > Acked-by: Krzysztof Kozlowski <krzk@kernel.org> > > > > --- > > > > arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi > > > > index d25aac5e0bf8..aea3800029b5 100644 > > > > --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi > > > > +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi > > > > @@ -1166,7 +1166,7 @@ usb_phy: usb-phy { > > > > }; > > > > }; > > > > > > > > - dwc3: dwc3@ff100000 { > > > > + dwc3: usb@ff100000 { > > > > compatible = "snps,dwc3"; > > > > reg = <0x0 0xff100000 0x0 0x100000>; > > > > > > > > > Oof. So this patch is breaking the usb gadget functionality on HiKey960 w/ AOSP. > > > > > > In order to choose the right controller for gadget mode with AOSP, one > > > sets the "sys.usb.controller" property, which until now for HiKey960 > > > has been "ff100000.dwc3". > > > After this patch, the controller isn't found and we would have to > > > change userland to use "ff100000.usb", which would then break booting > > > on older kernels (testing various LTS releases on AOSP is one of the > > > key uses of the HiKey960). > > > > > > So while I understand the desire to unify the schema, as HiKey960 > > > really isn't likely to be used outside of AOSP, I wonder if reverting > > > this one change is in the best interest of not breaking existing > > > userland? > > > > The node names are not part of an ABI, are they? I expect only > > compatibles and properties to be stable. If user-space looks for > > something by name, it's a user-space's mistake. Not mentioning that you > > also look for specific address... Imagine remapping of addresses with > > ranges (for whatever reason) - AOSP also would be broken? Addresses are > > definitely not an ABI. > > Though that is how it's exported through sysfs. The ABI is the format of sysfs file for example in /sys/devices. However the ABI is not the exact address or node name of each device. > In AOSP it is then used to setup the configfs gadget by writing that > value into /config/usb_gadget/g1/UDC. > > Given there may be multiple controllers on a device, or even if its > just one and the dummy hcd driver is enabled, I'm not sure how folks > reference the "right" one without the node name? I think it is the same type of problem as for all other subsystems, e.g. mmc, hwmon/iio. They usually solve it either with aliases or with special property with the name/label. > I understand the fuzziness with sysfs ABI, and I get that having > consistent naming is important, but like the eth0 -> enp3s0 changes, > it seems like this is going to break things. One could argue whether interface name is or is not ABI. But please tell me how the address of a device in one's representation (for example DT) is a part of a stable interface? > Greg? Is there some better way AOSP should be doing this? If you need to find specific device, maybe go through the given bus and check compatibles? Best regards, Krzysztof
WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org> To: John Stultz <john.stultz@linaro.org> Cc: Amit Pundir <amit.pundir@linaro.org>, Felipe Balbi <balbi@kernel.org>, Florian Fainelli <f.fainelli@gmail.com>, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@vger.kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, lkml <linux-kernel@vger.kernel.org>, Wei Xu <xuwei5@hisilicon.com>, Serge Semin <Sergey.Semin@baikalelectronics.ru>, Rob Herring <robh+dt@kernel.org>, YongQin Liu <yongqin.liu@linaro.org>, Serge Semin <fancer.lancer@gmail.com>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, Todd Kjos <tkjos@google.com> Subject: Re: [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name Date: Mon, 21 Dec 2020 22:04:23 +0100 [thread overview] Message-ID: <20201221210423.GA2504@kozik-lap> (raw) In-Reply-To: <CALAqxLWAFs+8VKKuMMg2gyfGXgQSjaWv9H5ayuohEK9m6OS3TA@mail.gmail.com> On Mon, Dec 21, 2020 at 12:24:11PM -0800, John Stultz wrote: > On Sat, Dec 19, 2020 at 3:06 AM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On Fri, Dec 18, 2020 at 09:11:42PM -0800, John Stultz wrote: > > > On Wed, Nov 11, 2020 at 1:22 AM Serge Semin > > > <Sergey.Semin@baikalelectronics.ru> wrote: > > > > > > > > In accordance with the DWC USB3 bindings the corresponding node > > > > name is suppose to comply with the Generic USB HCD DT schema, which > > > > requires the USB nodes to have the name acceptable by the regexp: > > > > "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly > > > > named. > > > > > > > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> > > > > Acked-by: Krzysztof Kozlowski <krzk@kernel.org> > > > > --- > > > > arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi > > > > index d25aac5e0bf8..aea3800029b5 100644 > > > > --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi > > > > +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi > > > > @@ -1166,7 +1166,7 @@ usb_phy: usb-phy { > > > > }; > > > > }; > > > > > > > > - dwc3: dwc3@ff100000 { > > > > + dwc3: usb@ff100000 { > > > > compatible = "snps,dwc3"; > > > > reg = <0x0 0xff100000 0x0 0x100000>; > > > > > > > > > Oof. So this patch is breaking the usb gadget functionality on HiKey960 w/ AOSP. > > > > > > In order to choose the right controller for gadget mode with AOSP, one > > > sets the "sys.usb.controller" property, which until now for HiKey960 > > > has been "ff100000.dwc3". > > > After this patch, the controller isn't found and we would have to > > > change userland to use "ff100000.usb", which would then break booting > > > on older kernels (testing various LTS releases on AOSP is one of the > > > key uses of the HiKey960). > > > > > > So while I understand the desire to unify the schema, as HiKey960 > > > really isn't likely to be used outside of AOSP, I wonder if reverting > > > this one change is in the best interest of not breaking existing > > > userland? > > > > The node names are not part of an ABI, are they? I expect only > > compatibles and properties to be stable. If user-space looks for > > something by name, it's a user-space's mistake. Not mentioning that you > > also look for specific address... Imagine remapping of addresses with > > ranges (for whatever reason) - AOSP also would be broken? Addresses are > > definitely not an ABI. > > Though that is how it's exported through sysfs. The ABI is the format of sysfs file for example in /sys/devices. However the ABI is not the exact address or node name of each device. > In AOSP it is then used to setup the configfs gadget by writing that > value into /config/usb_gadget/g1/UDC. > > Given there may be multiple controllers on a device, or even if its > just one and the dummy hcd driver is enabled, I'm not sure how folks > reference the "right" one without the node name? I think it is the same type of problem as for all other subsystems, e.g. mmc, hwmon/iio. They usually solve it either with aliases or with special property with the name/label. > I understand the fuzziness with sysfs ABI, and I get that having > consistent naming is important, but like the eth0 -> enp3s0 changes, > it seems like this is going to break things. One could argue whether interface name is or is not ABI. But please tell me how the address of a device in one's representation (for example DT) is a part of a stable interface? > Greg? Is there some better way AOSP should be doing this? If you need to find specific device, maybe go through the given bus and check compatibles? Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-12-21 21:05 UTC|newest] Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-11 9:15 [PATCH v2 00/18] dt-bindings: usb: Harmonize xHCI/EHCI/OHCI/DWC3 nodes name Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` [PATCH v2 01/18] arm: dts: keystone: Correct DWC USB3 compatible string Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` [PATCH v2 02/18] arm64: dts: amlogic: meson-g12: Set FL-adj property value Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` [PATCH v2 03/18] arc: dts: Harmonize EHCI/OHCI DT nodes name Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` [PATCH v2 04/18] arm: dts: hisi-x5hd2: " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-25 2:27 ` Wei Xu 2020-11-25 2:27 ` Wei Xu 2020-11-11 9:15 ` [PATCH v2 05/18] arm: dts: lpc18xx: " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` [PATCH v2 06/18] arm64: dts: hisi: " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-25 2:27 ` Wei Xu 2020-11-25 2:27 ` Wei Xu 2020-11-11 9:15 ` [PATCH v2 07/18] mips: dts: jz47x: " Serge Semin 2020-11-12 22:41 ` Thomas Bogendoerfer 2020-11-11 9:15 ` [PATCH v2 08/18] mips: dts: sead3: " Serge Semin 2020-11-12 22:41 ` Thomas Bogendoerfer 2020-11-11 9:15 ` [PATCH v2 09/18] mips: dts: ralink: mt7628a: " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-12 22:41 ` Thomas Bogendoerfer 2020-11-12 22:41 ` Thomas Bogendoerfer 2020-11-12 22:41 ` Thomas Bogendoerfer 2020-11-11 9:15 ` [PATCH v2 10/18] powerpc: dts: akebono: " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` [PATCH v2 11/18] arm64: dts: marvell: cp11x: Harmonize xHCI " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-30 14:23 ` Gregory CLEMENT 2020-11-30 14:23 ` Gregory CLEMENT 2020-11-11 9:15 ` [PATCH v2 12/18] arm: dts: marvell: armada-375: Harmonize DWC USB3 " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-30 14:22 ` Gregory CLEMENT 2020-11-30 14:22 ` Gregory CLEMENT 2020-11-11 9:15 ` [PATCH v2 13/18] arm: dts: keystone: " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` [PATCH v2 14/18] arm: dts: stih407-family: " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-11 9:15 ` [PATCH v2 15/18] arm64: dts: apm: " Serge Semin 2020-11-11 9:15 ` [PATCH v2 16/18] arm64: dts: hi3660: " Serge Semin 2020-11-11 9:15 ` Serge Semin 2020-11-25 2:23 ` Wei Xu 2020-11-25 2:23 ` Wei Xu 2020-12-19 5:11 ` John Stultz 2020-12-19 5:11 ` John Stultz 2020-12-19 11:06 ` Krzysztof Kozlowski 2020-12-19 11:06 ` Krzysztof Kozlowski 2020-12-21 20:24 ` John Stultz 2020-12-21 20:24 ` John Stultz 2020-12-21 21:04 ` Krzysztof Kozlowski [this message] 2020-12-21 21:04 ` Krzysztof Kozlowski 2020-11-11 9:15 ` [PATCH v2 17/18] usb: dwc3: qcom: Detect DWC3 DT-nodes with "usb"-prefixed names Serge Semin 2020-11-11 16:05 ` Bjorn Andersson 2020-11-11 9:15 ` [PATCH v2 18/18] arm64: dts: qcom: Harmonize DWC USB3 DT nodes name Serge Semin 2020-11-11 16:08 ` Bjorn Andersson 2020-11-12 18:43 ` Serge Semin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201221210423.GA2504@kozik-lap \ --to=krzk@kernel.org \ --cc=Sergey.Semin@baikalelectronics.ru \ --cc=amit.pundir@linaro.org \ --cc=balbi@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=f.fainelli@gmail.com \ --cc=fancer.lancer@gmail.com \ --cc=gregkh@linuxfoundation.org \ --cc=john.stultz@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=robh+dt@kernel.org \ --cc=tkjos@google.com \ --cc=xuwei5@hisilicon.com \ --cc=yongqin.liu@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.