From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76EB9C433E0 for ; Mon, 21 Dec 2020 21:06:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2229723124 for ; Mon, 21 Dec 2020 21:06:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2229723124 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2mO8M4TSDWUcgjmYjaACkTBfyBwDVMHIhPkx7YHNUSc=; b=sQtZaxvwhRj/v8nRY+GnQafN5 8VEX3uQTO5h8iZDfZOsthd3mXL2W0TUAHO580inetzYmdxz6gCjP8HzGbhlzaZQC/o6CmqhrFOTRx UnxLChh4+PrkslAQfw/74/YdSUHjo6GZFtVgKpJOwcbPTQPA22KGB+X8HU1Vio/KpIplCZXSOX1TP YR8SCpE953RI9XUn2kxyvrA6eW5xkAcwoRUjgyBtZM2zBIlR7CFgG3eVc65eA1MHG336+hNzhLwsX pOw5jvXsjeXn6/LDC/QEhZDzF53KhNXs+V8uK5+fHXGw/NOJAAF4swf7wV7AQHpGfSSK3hl8w7P1c BAkCAbcOA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krSM3-0001f8-1w; Mon, 21 Dec 2020 21:04:31 +0000 Received: from mail-wm1-f52.google.com ([209.85.128.52]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krSLz-0001eN-Ut for linux-arm-kernel@lists.infradead.org; Mon, 21 Dec 2020 21:04:29 +0000 Received: by mail-wm1-f52.google.com with SMTP id 3so217334wmg.4 for ; Mon, 21 Dec 2020 13:04:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dsnNjmwcuVkeuRHLqROWQ9lGvdQSW7my2nTIVReeyR8=; b=qoTWMF3rGOo/XftSeKc72G1mMjVpaaNGyq9QzOMEAlY7s7Mx3bTOVO5NXqImBrnK8y NuiGZDmSry0KcJPeQ4E6dM1PE4dkNHQReBpuArnEckxU4TW07d2yisOYWJ8yBuBa39pd QlAn7XQgzn5mbBO9LCw4PPGpZni/yPiv8ANKNntVB+Xkhd+pIWJUQlYjnwqAfAgaKuRr 8KXTbm81GaCXdam3gpAzuvt6mpHnH0IhKnYMxWiJfEQrvQQlCP08Xnr87tYBwE3vU6z1 z4DQSjNggtEnPV/qRiNULkCoaallbuUX8O2RecCAOABJXUV6Yz7no2ulMpAKWiRcwZE6 lzzQ== X-Gm-Message-State: AOAM532opQJDT7PbGE75d4lf+NZj8Ko2oQsQQTIFWGImLbTZzDcM3D6c n+n+OrZIXSixVdNX4Z/rTOg= X-Google-Smtp-Source: ABdhPJysKzeZfeg6+bS9PqIUdpBgFlcY8AWgEKpWO6Qq6XoLnemp1NYIvayrZ5SEqPNlu7iR5ueWyg== X-Received: by 2002:a1c:9c52:: with SMTP id f79mr18497648wme.3.1608584666260; Mon, 21 Dec 2020 13:04:26 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id b127sm22859713wmc.45.2020.12.21.13.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 13:04:25 -0800 (PST) Date: Mon, 21 Dec 2020 22:04:23 +0100 From: Krzysztof Kozlowski To: John Stultz Subject: Re: [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name Message-ID: <20201221210423.GA2504@kozik-lap> References: <20201111091552.15593-1-Sergey.Semin@baikalelectronics.ru> <20201111091552.15593-17-Sergey.Semin@baikalelectronics.ru> <20201219110603.GA8061@kozik-lap> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201221_160428_019103_3BD77957 X-CRM114-Status: GOOD ( 39.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amit Pundir , Felipe Balbi , Florian Fainelli , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Greg Kroah-Hartman , lkml , Wei Xu , Serge Semin , Rob Herring , YongQin Liu , Serge Semin , linux-arm-kernel , Todd Kjos Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 21, 2020 at 12:24:11PM -0800, John Stultz wrote: > On Sat, Dec 19, 2020 at 3:06 AM Krzysztof Kozlowski 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 > > > 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 > > > > Acked-by: Krzysztof Kozlowski > > > > --- > > > > 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