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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 BDE65C433DB for ; Mon, 21 Dec 2020 20:25:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 931F7224D1 for ; Mon, 21 Dec 2020 20:25:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726137AbgLUUZF (ORCPT ); Mon, 21 Dec 2020 15:25:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbgLUUZE (ORCPT ); Mon, 21 Dec 2020 15:25:04 -0500 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F4181C0613D3 for ; Mon, 21 Dec 2020 12:24:23 -0800 (PST) Received: by mail-lf1-x132.google.com with SMTP id o13so26743783lfr.3 for ; Mon, 21 Dec 2020 12:24:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Uo62cfbGwqBQ1vi9h4r6gnV/BJOfoFEQHUI1QVrChw8=; b=TIu4KLVS+9Rm0KlbAYuebGgAAEETKA/S4ozhFubA1CGQ3UHtjkr9UIThiEcppTHkOv 3hy6J9dPdGLcWVK39btAeBmlFwTQKfPEyPnLcBGU8uvjjdd5QNHSZ4VN9jpu8cqS9aTI GC6uVjtFbHkZrizklm74Bh85+NSpWQp7mGMiGF2ETFAl9Qy1mbCr6ErhOvcl3rHrNhqY PP8BjuqW+5Vs58FaTIs9eB2IP82hjchyPkPrNHXP1oufzKfd5NBkUkmUkw3d0l7YTRln ic6W8HxOlXZhSMXJv8z2oyVs6ngSRkGJcf/NiUWy1/39R1v8DujTPqn5Pc1aSGNpnWdr 9wdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Uo62cfbGwqBQ1vi9h4r6gnV/BJOfoFEQHUI1QVrChw8=; b=WVY6rtSt5TMxtrk+jdnxySrc2mQ+IuULHQMwB/rcD38eQaX2TrqbiGWYyXECgZexUO Oo9nDytUIcRNkm/nKmR+Mf92EJ5FaTo/LAX3cEFPkZ7CccIVjwK2lPsHTQOGkxvyQfe/ fFTJjYhJpswc9jmjXqiVX4VjGGyxHtSttBA0L2FVC0ncwmOYtQmqrObpRC5vGQLNNaJv 4qmZkCXBe06i/uR9YeMSq4gDT1dqk3TytToPi/UV4GLyN+47Am4vfrpSCWvTIpTru+yG nRZ9q5+Fp3gTbuCTjva3gBfdQubB8KbkOoDITyE4qYuCM4xTRn7xlcGlgwlSLFBCIYCm MIJg== X-Gm-Message-State: AOAM531b3QAcVDmUwiAbrJZMDJpx97G6oAUzTCEjkYeThclWAHuQCzoj wD+kSNY0wogF1BFtBsSXacjHmy+XFdU6hgq48BKrQg== X-Google-Smtp-Source: ABdhPJxXidtKbU89ufDpI4Z3AewOMzKtB9PhbwEssgW9oSBIrG1zlpmXWFD85rLEvdIbkoXQLXJPxhqPwlsBgOgYO0E= X-Received: by 2002:a05:651c:286:: with SMTP id b6mr8260337ljo.232.1608582262430; Mon, 21 Dec 2020 12:24:22 -0800 (PST) MIME-Version: 1.0 References: <20201111091552.15593-1-Sergey.Semin@baikalelectronics.ru> <20201111091552.15593-17-Sergey.Semin@baikalelectronics.ru> <20201219110603.GA8061@kozik-lap> In-Reply-To: <20201219110603.GA8061@kozik-lap> From: John Stultz Date: Mon, 21 Dec 2020 12:24:11 -0800 Message-ID: Subject: Re: [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name To: Krzysztof Kozlowski , Greg Kroah-Hartman Cc: Serge Semin , Felipe Balbi , Florian Fainelli , Rob Herring , Wei Xu , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-arm-kernel , Serge Semin , lkml , YongQin Liu , Amit Pundir , Todd Kjos Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 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. Greg? Is there some better way AOSP should be doing this? thanks -john 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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 3E79AC433E0 for ; Mon, 21 Dec 2020 20:26:22 +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 DE6BD224D1 for ; Mon, 21 Dec 2020 20:26:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE6BD224D1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.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:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ryvEAwDLGE1dgrlzjLwMKK5QTbwrwNBgPEsdPjwxPio=; b=EyDr3m+priAjOjMQsOKzY35vC c61y9MfVizjUKZOqJtghGhEWnc4swzCAZC9wN7/LO3D5OYKvbeQhVxiBnPG1GHoJf9i230BQFhF1K ti0cUhN1wSNuukQbmuS9tzB0101ULDGWLy866E/Zfwa+qzC5bOAssFvbLBqRhH/UZ7LknZQAosLdr 3kOpyiHrEtVrYFqIzsHCECSZbIvqfTArzgRZP4pHhn33FMbQXPinYjQgMRLLcZuwIcAXJvyndkrab 2/PA0du0uZ8D9dnRtJjn0bCs693wWkFL3diKRDfM+TOBzGgJ+iOddWidCg2lFu0Oxlxr7eppLZMRH s0xHkwnxg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krRjI-0007cp-Mf; Mon, 21 Dec 2020 20:24:28 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krRjF-0007cC-TJ for linux-arm-kernel@lists.infradead.org; Mon, 21 Dec 2020 20:24:27 +0000 Received: by mail-lf1-x12d.google.com with SMTP id a12so26726052lfl.6 for ; Mon, 21 Dec 2020 12:24:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Uo62cfbGwqBQ1vi9h4r6gnV/BJOfoFEQHUI1QVrChw8=; b=TIu4KLVS+9Rm0KlbAYuebGgAAEETKA/S4ozhFubA1CGQ3UHtjkr9UIThiEcppTHkOv 3hy6J9dPdGLcWVK39btAeBmlFwTQKfPEyPnLcBGU8uvjjdd5QNHSZ4VN9jpu8cqS9aTI GC6uVjtFbHkZrizklm74Bh85+NSpWQp7mGMiGF2ETFAl9Qy1mbCr6ErhOvcl3rHrNhqY PP8BjuqW+5Vs58FaTIs9eB2IP82hjchyPkPrNHXP1oufzKfd5NBkUkmUkw3d0l7YTRln ic6W8HxOlXZhSMXJv8z2oyVs6ngSRkGJcf/NiUWy1/39R1v8DujTPqn5Pc1aSGNpnWdr 9wdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Uo62cfbGwqBQ1vi9h4r6gnV/BJOfoFEQHUI1QVrChw8=; b=Csal3p3aKETbHyzQJo1tHVD7BqZKwzynhHQQ/fwPD8xsbagCK1WhGfLg+T2AIoi/5j +ikDS3GCgaxAEj9auiqZHF1HumlGCfBoQ0763cp6qxi7uZF8JcJZLQOWZoO54y+ZYGQa TLh/FJnDcQYccSJjuo73ExhBBYmTrLi/AFbInze7cWtOyIylQVkLtxQO2FVzS/kYuCA/ 8Y7NUnx7HDo+N8otNsMDR2Cy67ZtkMbmmgg0OSMw2UqXOYxtkAXtymYHOTueXpryGn+Q hWPAMvpM41k+YyUF+ClU3R9J+pkp6bDCUPF2yd55bovmf15ftAQd003yw3vHamSMVnvc Umbw== X-Gm-Message-State: AOAM531XrtReJcOj6tP5TkfXQDcyVzysna9f91NvtFs7KW4jIGVfyyiX crdTeug1/vVvkDMQjt8b1zzk0Ng371HlpdIZt4MrwA== X-Google-Smtp-Source: ABdhPJxXidtKbU89ufDpI4Z3AewOMzKtB9PhbwEssgW9oSBIrG1zlpmXWFD85rLEvdIbkoXQLXJPxhqPwlsBgOgYO0E= X-Received: by 2002:a05:651c:286:: with SMTP id b6mr8260337ljo.232.1608582262430; Mon, 21 Dec 2020 12:24:22 -0800 (PST) MIME-Version: 1.0 References: <20201111091552.15593-1-Sergey.Semin@baikalelectronics.ru> <20201111091552.15593-17-Sergey.Semin@baikalelectronics.ru> <20201219110603.GA8061@kozik-lap> In-Reply-To: <20201219110603.GA8061@kozik-lap> From: John Stultz Date: Mon, 21 Dec 2020 12:24:11 -0800 Message-ID: Subject: Re: [PATCH v2 16/18] arm64: dts: hi3660: Harmonize DWC USB3 DT nodes name To: Krzysztof Kozlowski , Greg Kroah-Hartman X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201221_152426_241540_F30C3D03 X-CRM114-Status: GOOD ( 31.05 ) 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" , 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 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. 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 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. Greg? Is there some better way AOSP should be doing this? thanks -john _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel