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_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS 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 D6EA7C433ED for ; Tue, 6 Apr 2021 12:12:53 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 31CB3613C2 for ; Tue, 6 Apr 2021 12:12:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31CB3613C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc: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=Ew5ccATOookMXAbqgwX4kr8JBpAVuvk07sPslX7GnBo=; b=Fc3QH7TbhtiPM15OFFA8inbu/ 6Y7mZCcYX6RFRaDWYiYO1lfwqKc1YW0cg44WG7s39NlhV5MOQGAj7h5tR7f0u+99aRviHtULOSUyt 9y8Ymns1tIQ075fgTji/P1I/h5e1iLEbNRGDHXNAZjnvJpjGJEQX6kqXd/KNamuCst90HWumgdaAN r5yvUvfk44sqK8g8RBgiEFiSvEvCLJF/P6t5si+6IaVw8/WYQ7/oZzlAlAcjPeg9hbc0ujXmGmBTl jO9hdvi1quXCkSdaDGnrljPPT8dXhX5c0tcuLpPiiRldxV+CO9adaZbcPJzXRXCJxBGSukgfbfcm0 FhW5kZamQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTkXP-002W1y-J3; Tue, 06 Apr 2021 12:10:31 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTkXL-002W0j-F5; Tue, 06 Apr 2021 12:10:29 +0000 Received: by mail-lf1-x134.google.com with SMTP id b14so22301618lfv.8; Tue, 06 Apr 2021 05:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A0FXSTiM7GC4Mvwuv2T0oynhHNDd7L5en4InWzjAui8=; b=immwf48ORJKbTnbiusrILWixOG0SjnZnU9YsXi79NfCDXcOLmUuRT1TsielKwFzHRf Q0UFpaJ08oq0o9TvShdrZ4y3scfNFZbr1RmMFzwVE3qZo8u15YbEuSJukLC1Poe+26eE w7KRKoVL+KN5ShIDhGdc4DbyURCW1fAo9d8IB2k6TiX20Gwi/DDNmeb/JL4sCev+sf8i kHElm7txv2YKTsQucNpYG2gZndEnTjBAMLxIF6d2Zm9bmYE3MQnv8T6vkdt5ESZfGGpM X3zkBX9nBP3ZSqqoqQ0wpPmiLBtqmEvYqsEmeXaW3PtBzQ5n0wPNkABvzmdHj48Yz7V5 PeUg== 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=A0FXSTiM7GC4Mvwuv2T0oynhHNDd7L5en4InWzjAui8=; b=qZ1Yl2iQih8g8/4+vFtNjaUJKDRc6DaMdjqXB6ixHblsHZH7j2OOOlzLc0vxGvPN2C dv6uFDqC0Pu4VgoifjDaPSRai8G4QMqtmbv6TBnwrhXKoNKhiE80lpPEM8qXq2wpYEIX K8NPmAfg+qrbvpEHLfkRYWMbpRztrsNadPMDcqfe6wzFuRfd9ZZjG14pd/BqbmwEGiCj k2RV8zpVZXh4eRrlGws1tN6cIfSXi0aldOwMLvtzqExeAffQiJXuRYltvFmdTnl4lnGW 3xuwkYAuVezQeVp69E+tpOz2m7V6u952IXXmXO/3UdtnrLO5VwMsSkxKUqpBI59ReiEu GoFQ== X-Gm-Message-State: AOAM532FE39xSZc3RS+1yYzQYkUrZc604FtsbWlyluQEhGQwbqlj1sMK 4zeXNeLg9L61MoCY5Yo1PYn2klXEIh6YKDqaLRmlrK0ZW20= X-Google-Smtp-Source: ABdhPJy5j7Oe8GDmvwGPYJBow20bn4HG2AffSOHb5q7QrCTnk5XtXrtLuRd9Vm9lhM9/OaOc98uquqs4FenNXOVGvNM= X-Received: by 2002:ac2:5ca7:: with SMTP id e7mr20852931lfq.646.1617711026053; Tue, 06 Apr 2021 05:10:26 -0700 (PDT) MIME-Version: 1.0 References: <20210405093423.16149-1-cnsztl@gmail.com> In-Reply-To: From: Tianling Shen Date: Tue, 6 Apr 2021 20:10:14 +0800 Message-ID: Subject: Re: [PATCH v2] rockchip: enabled LAN port on NanoPi R2S To: Johan Jonker Cc: Rob Herring , Heiko Stuebner , David Bauer , Robin Murphy , Chen-Yu Tsai , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux ARM , "open list:ARM/Rockchip SoC..." , linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210406_131027_611816_5EBF3E56 X-CRM114-Status: GOOD ( 25.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Hi Johan, On 2021-04-05 19:03, Johan Jonker wrote: > > Hi Tianling, > > On 4/5/21 11:34 AM, Tianling Shen wrote: > > From: David Bauer > > > > Enable the USB3 port on the FriendlyARM NanoPi R2S. > > This is required for the USB3 attached LAN port to work. > > > > Signed-off-by: David Bauer > > [added device node for USB Ethernet controller] > > Signed-off-by: Tianling Shen > > --- > > .../boot/dts/rockchip/rk3328-nanopi-r2s.dts | 32 +++++++++++++++++++ > > 1 file changed, 32 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts > > index faf496d789cf..18936b393d9d 100644 > > --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts > > +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts > > @@ -13,6 +13,10 @@ > > model = "FriendlyElec NanoPi R2S"; > > compatible = "friendlyarm,nanopi-r2s", "rockchip,rk3328"; > > > > + aliases { > > + ethernet1 = &r8153; > > + }; > > + > > chosen { > > stdout-path = "serial2:1500000n8"; > > }; > > @@ -37,6 +41,16 @@ > > }; > > }; > > > > > + vcc_rtl8153: vcc-rtl8153-regulator { > > sort nodename > > > + compatible = "regulator-fixed"; > > + gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&rtl8153_en_drv>; > > + regulator-always-on; > > > + regulator-name = "vcc_rtl8153"; > > exception to the sort rule > sort regulator-name above all other regulator properties > > > + enable-active-high; > > sort > > ---- > Heiko's sort rules: > > compatible > reg > interrupts > [alphabetical] > status [if needed] > > ---- Thank you very much, and I will update it in v3. > > > + }; > > + > > leds { > > compatible = "gpio-leds"; > > pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>; > > @@ -265,6 +279,12 @@ > > }; > > }; > > }; > > + > > + usb { > > + rtl8153_en_drv: rtl8153-en-drv { > > + rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; > > + }; > > + }; > > }; > > > > &io_domains { > > @@ -364,6 +384,18 @@ > > dr_mode = "host"; > > }; > > > > +&usbdrd3 { > > + dr_mode = "host"; > > + status = "okay"; > > + > > > + r8153: usb-eth@2 { > > With YAML undocumented additional properties and nodes generate > notifications. > We need a change in the documents below for that. > rockchip,dwc3.yaml > usb-drd.yaml > usb.yaml > > Is there a standard for the usb-eth nodename? > > > + compatible = "realtek,rtl8153"; > > Since a while Rob has improved has scripts. > There's no escape anymore. > Add a YAML document to this serie for "realtek,rtl8153". This is actually added by another patch[1], but doesn't go to upstream yet. I'll ask David if he would like to submit it. Kindly ping David. 1: https://github.com/openwrt/openwrt/blob/master/target/linux/rockchip/patches-5.10/002-net-usb-r8152-add-LED-configuration-from-OF.patch https://github.com/openwrt/openwrt/blob/master/target/linux/rockchip/patches-5.10/003-dt-bindings-net-add-RTL8152-binding-documentation.patch > > Improve checking for undocumented compatible strings > https://github.com/devicetree-org/dt-schema/commit/93e7ada8d53af099074cb5d53f7caa12835784e0 > > > + reg = <2>; > > Why 2 ? > This is the device number on the USB bus. > > + > > > + local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */ > > This is a private property. > In a generic dts that's up to the user. Okay I will drop this. Thanks, Tianling. > > > + }; > > +}; > > + > > &usb_host0_ehci { > > status = "okay"; > > }; > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel