Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3481292pxf; Mon, 5 Apr 2021 13:19:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5hfvvp4RTbHX+iQsHmO2eW5BN0kNWoiaiuH8yhKNDPx86VnxtMK29LUV0g+vL843jBnLi X-Received: by 2002:a92:cf45:: with SMTP id c5mr3882280ilr.259.1617653967795; Mon, 05 Apr 2021 13:19:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617653967; cv=none; d=google.com; s=arc-20160816; b=gUU28QEits3bLCe7BD7gJ6/Il0s1z2g+jwP5V+wbXnvEomV9/ijBv+3Kso2xROCbvX 2GEBNCQOqUFk2NFAClXKrYAccMBWwXhfKNriDvgxQSibG1UOWnv45GAd0HEmf8p0IuwY QTgJsqFOrgcJ3NDKa5bzaE9/Jb8r5OIHswfcG70RPw9S2lhr5aB8sYac0U+hJBkR0b7S +d1D/G8EnIz/VQfahtjLF6iv+1rYTVrkps5zW0h7nOvCPKT6WbzP0qQVt8kHix5eaglw GKYNPJYFlQKiBEAoGcrlKNfyCJ2ShnjTyZMVZbN1m0W6R+C7o/1Fbg6KXRWD3vkGPNIJ qdDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=8aY4FoI3CyCqXwB37eKldC/2UcQRzlAgjOJdYF8kwC0=; b=FvWI7/Sb/+1lLJeEG1kIcIDzZyNu03P0aW4AmqpyUk0NgyEQhDn0T1nk/ig6IGeaab 3+y7CxHO83K1iOIbLU9PsFtbT/OS7bpcWHcRs5Yrl8VYRFqH/q6hRUx5Do3gWCt7qWMw v3DJLo3nN1u/DZOswMnEzVIf5bX63N6qKLiAqLMaYZ9qdu9gLy0ul6irf9GCTHAS9dID 25Rf2A3hByJWwhElbvA7Y+KPKgWvdi6DxXivMyiKFFgY4PGxAjgIG4/ewGKt5OZD/qLH PsQN6t3Dmlk9cEw+lOgU/ZsC6VdL5aIvr6efFdvxDbOwN7Zo9S7iFwk3hb2qLhWlXiCp VMsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=grZdC7ij; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si14913799jav.10.2021.04.05.13.19.15; Mon, 05 Apr 2021 13:19:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=grZdC7ij; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235301AbhDEL4n (ORCPT + 99 others); Mon, 5 Apr 2021 07:56:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:34954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233778AbhDEL4m (ORCPT ); Mon, 5 Apr 2021 07:56:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 49874613B2; Mon, 5 Apr 2021 11:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617623796; bh=qD0D8WJ+lKgn1aSNGRrMa7S04oUn0rYr1F45lHkry/8=; h=References:In-Reply-To:Reply-To:From:Date:Subject:To:Cc:From; b=grZdC7ijpY1lPm1OzB+Ap4hhqBk1646Ne/QNClL1tj4bVhkGMMkTgaw+LQLAIfzkj ftW1KmF0x4JjgtfUIo4BY/lkUhR7n1wCzQi9xQl3vinFi5R/DoNomN+KplwaOYUnAx P3wSX1TMQvB2eB7yykUc6fyLpLMKasbAcHz3XYqKP9vwkIA2sJwSz8VYvSPs0ayxxi U4gngg4bafEuPPXldR3kvtA5CtWIti13xscPaTwNgQYBRMZYe8PzV9FQ9LPiurkfx4 jbg6SfzH9QtXxv2ul5b4iYCnIRnbLCczsSplkVZ53ddRw/sIkTDGPybA7hU1MVtI83 eNrj5Kcslqnag== Received: by mail-lf1-f49.google.com with SMTP id 12so16914329lfq.13; Mon, 05 Apr 2021 04:56:35 -0700 (PDT) X-Gm-Message-State: AOAM532mpBUCAwgHOs5bYnzq84s2VZt9gM6j00BDfHWUAjV3UUgfo0TH 1ufmto3QN4RQavEnsai/Z+2FlS/l+rNPd4jQnM0= X-Received: by 2002:ac2:46ee:: with SMTP id q14mr17318622lfo.303.1617623793546; Mon, 05 Apr 2021 04:56:33 -0700 (PDT) MIME-Version: 1.0 References: <20210405093423.16149-1-cnsztl@gmail.com> In-Reply-To: Reply-To: wens@kernel.org From: Chen-Yu Tsai Date: Mon, 5 Apr 2021 19:56:21 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] rockchip: enabled LAN port on NanoPi R2S To: Johan Jonker , Tianling Shen Cc: Rob Herring , Heiko Stuebner , David Bauer , Robin Murphy , devicetree , linux-arm-kernel , "open list:ARM/Rockchip SoC..." , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 5, 2021 at 7:03 PM 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] > > ---- > > > + }; > > + > > 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? The USB devices binding seems to specify "device" and then "interface" sub-nodes. > > + 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". Actually it should be "usbbda,8153", which conforms to Documentation/devicetree/bindings/usb/usb-device.yaml Giving "realtek,rtl8153" to the kernel will not help it match any device. ChenYu > Improve checking for undocumented compatible strings > https://github.com/devicetree-org/dt-schema/commit/93e7ada8d53af099074cb5d53f7caa12835784e0 > > > + reg = <2>; > > Why 2 ? > > > + > > > + 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. > > > + }; > > +}; > > + > > &usb_host0_ehci { > > status = "okay"; > > }; > > >