Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp616700imm; Fri, 11 May 2018 03:51:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqISzeaQHegeQw/tCZsvp2NofZw49SQ0G9kgWHqjkJOUsZCNZeandqwsTo663PPT8CqqSv4 X-Received: by 2002:a17:902:b40f:: with SMTP id x15-v6mr4933879plr.167.1526035887826; Fri, 11 May 2018 03:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526035887; cv=none; d=google.com; s=arc-20160816; b=LgFleFm6pIFAf9rtQjGGgJbrcDTbDRqjgfCHhrDuSao4l6X5EWV8D2qlMfMsuPLbbw yOVPCUalc+pbriZWWpiDjEu1d6Y0O25WF08clEYgihmg3ScZJwfhPwxpObXxg2Suue4i /syYqTmzzY76LSC8j+1rOK1GHRhaA/6z7r6lrv3bCVvmW+JR4AvxffN/eqizZbulIelz N8LUy1Mp7KW3J/3N66Sj4s5g/L/tixxZrfXCKjGNS0yvaMGxsJwU9nSY8tMG7PBgCRQb LLU8ZmFgdvrHF/IDfq3O/V0ubEN7XOXj8Y3wZwdxZq+zNGRigbd8A0Q26qto6c07Fag7 +p+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=3ERhAeUNKEFYeoA3SBkad/WpilEl1rmGiTsFLSkUh+E=; b=rtjeyMsRDD2CImsd97HTVWDxDZS1TrlEFzsa4ucLNDnZ5ZWLMKC+/p8fJB9028ShMd sGkdxP9wdfkCC6nQ225RmM9Nr/WiD8NuNIBU9X9c4mlZGo/l5xHPest5jf4pbUWl5v8S du46Y2wfhpRacg4jG2BQjAIOtGSqAi4CxvQQdEmNYglyr/PELZkRbgUruKhKVtd5FwgK yzZsHcdEFyZuExK+jGm9dQxxATbfDS+PUTwYfCoMd6eAc0fyg72ADJk+fcabGU6e9tEx mdknqQvuqSLikAIjSmtfgvNRV3WrNzRE7PAvs8NglYneUrXrLCBlRqLutYaxgK7Y0ZDs qWsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l1GceWBc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e63-v6si2972148pfd.261.2018.05.11.03.51.12; Fri, 11 May 2018 03:51:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l1GceWBc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbeEKKvA (ORCPT + 99 others); Fri, 11 May 2018 06:51:00 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36683 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbeEKKu7 (ORCPT ); Fri, 11 May 2018 06:50:59 -0400 Received: by mail-lf0-f67.google.com with SMTP id t129-v6so7285801lff.3; Fri, 11 May 2018 03:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3ERhAeUNKEFYeoA3SBkad/WpilEl1rmGiTsFLSkUh+E=; b=l1GceWBc9xwmdFOEc68aQrZhzyDJnbZgBh2KgtMcF0UY0hEthZshzrX62k8XwuPOBl 3/7WiVsIPjg0KqmqVhQ1uPVEncMERTJym5UFrLbk2BG1Nyl3Qhy+naIIYMxZpGTSI9Xl /UeVzqI4t2h8FkwS3XO+SbzYCg6jEM0eie48V/twHAhAiUrutHg1FoQsvSmvg2WwSLBn SKj3YYrt3CvLdPfWCWSsLagkQC00EP/F7Gtjqm+L3jnnYYpwwVMDyGKVtAPdeWB4SRwA wlqrnrlXPQUMIJ1P++mYUTA+tYT7OsCca5T5LTv7cOwtodu+Q8HMFfP+XqpkktQ/7sqB 2uNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3ERhAeUNKEFYeoA3SBkad/WpilEl1rmGiTsFLSkUh+E=; b=LzzVvBliZp33Ch0rz89T8t3eQatUtqc3HcpO+m4l1nf4ekDQrzskD71Qju0Xcq5wIt HrE54EV+MN4ZDLvM88j7nfWYxAs3ARFqTtKrhZh4DT0umUqR6Dpx5Lw/xqhOhxm7IBBm CpfIXxqNh9M4A6OIGuA4Li/7f8AmH0i5t79RPwC5BVgpWNqN32bdXZhUIkc7PUH5W8YS joRrVudoxICDhYEPZbTClspIWUtXgVcHv4ti0nrOkOr6FJ1YP/6bTlIPnj9o45ofc8vT ukdsPnNLsdOu7U1dlR4oURvCP695LXa2nYBMy9GuBOPA3UO5HbROCqIrsqNx2GJKGHnm Jo0Q== X-Gm-Message-State: ALKqPweDGHMt/PS2//m6CSdeIh1OVr3mqSjn75s0gp81WjiIHRC/ga9U T2uJaARtOfNMyshQu/vk8yaVI10qJBJvKO9PGvE= X-Received: by 2002:a19:8f49:: with SMTP id r70-v6mr1234751lfd.79.1526035857019; Fri, 11 May 2018 03:50:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:ccc6:0:0:0:0:0 with HTTP; Fri, 11 May 2018 03:50:16 -0700 (PDT) In-Reply-To: <20180508161636.GA23960@rob-hp-laptop> References: <20180505213448.8180-1-andrea.greco.gapmilano@gmail.com> <20180508161636.GA23960@rob-hp-laptop> From: Andrea Greco Date: Fri, 11 May 2018 12:50:16 +0200 Message-ID: Subject: Re: [RFC PATCH 1/3] arcnet: com20020: Add memory map of com20020 To: Rob Herring Cc: m.grzeschik@pengutronix.de, Andrea Greco , Mark Rutland , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/08/2018 06:16 PM, Rob Herring wrote: > On Sat, May 05, 2018 at 11:34:45PM +0200, Andrea Greco wrote: >> From: Andrea Greco >> >> Add support for com20022I/com20020, memory mapped chip version. >> Support bus: Intel 80xx and Motorola 68xx. >> Bus size: Only 8 bit bus size is supported. >> Added related device tree bindings >> >> Signed-off-by: Andrea Greco >> --- >> .../devicetree/bindings/net/smsc-com20020.txt | 23 +++ > > Please split bindings to separate patch. Ok > >> drivers/net/arcnet/Kconfig | 12 +- >> drivers/net/arcnet/Makefile | 1 + >> drivers/net/arcnet/arcdevice.h | 27 ++- >> drivers/net/arcnet/com20020-membus.c | 191 +++++++++++++++++++++ >> drivers/net/arcnet/com20020.c | 9 +- >> 6 files changed, 253 insertions(+), 10 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/net/smsc-com20020.txt >> create mode 100644 drivers/net/arcnet/com20020-membus.c >> >> diff --git a/Documentation/devicetree/bindings/net/smsc-com20020.txt b/Documentation/devicetree/bindings/net/smsc-com20020.txt >> new file mode 100644 >> index 000000000000..39c5b19c55af >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/net/smsc-com20020.txt >> @@ -0,0 +1,23 @@ >> +SMSC com20020, com20022I > > What does this device do? > Changed in: SMSC com20020 Arcnet network controller >> + >> +timeout: Arcnet timeout, checkout datashet >> +clockp: Clock Prescaler, checkout datashet > > s/datashet/datasheet/ > >> +clockm: Clock multiplier, checkout datasheet > > Would these 3 properties be common for arcnet devices? If not, then they > should have a vendor prefix. > Timeout is arcnet propelty: Other is smsc params, then become: - timeout: Arcnet timeout - smsc-clockp: Clock Prescaler - smsc-clockm: Clock multiplier - smsc-backplane: Controller use backplane mode inside of transceiver I forget backplane propelty, but is required >> + >> +phy-reset-gpios: Chip reset ppin > > Use 'reset-gpios' as that is standard. > >> +phy-irq-gpios: Chip irq pin > > Use 'interrupts'. Interrupt capable gpio controllers are also interrupt > controllers. > Ok, change to standard >> + >> +com20020_A@0 { > > Node names should be generic based on the class of device. I don't think > we have one defined, but how about 'arcnet'. > > Unit addresses must have a corresponding reg property. How is this > device accessed? > Then: arcnet@28000000 >> + compatible = "smsc,com20020"; > > Not documented. > I miss something? Where add this doc? Is not this file? Documentation/devicetree/bindings/net/smsc-com20020.txt >> + >> + timeout = <0x3>; >> + backplane = <0x0>; >> + >> + clockp = <0x0>; >> + clockm = <0x3>; >> + >> + phy-reset-gpios = <&gpio3 21 GPIO_ACTIVE_LOW>; >> + phy-irq-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>; >> + >> + status = "okay"; > > Don't should status in examples. > >> +}; Ok Final result of new Patch, for bindings: SMSC com20020 Arcnet network controller Required propelty: - timeout: Arcnet timeout - smsc-clockp: Clock Prescaler - smsc-clockm: Clock multiplier - smsc-backplane: Controller use backplane mode inside of transceiver - reset-gpios: Chip reset pin - interrupts: Should contain controller interrupt arcnet@28000000 { compatible = "smsc,com20020"; timeout = <0x3>; smsc-backplane = <0x0>; smsc-clockp = <0x0>; smsc-clockm = <0x3>; reset-gpios = <&gpio3 21 GPIO_ACTIVE_LOW>; interrupts = <&gpio2 10 GPIO_ACTIVE_LOW>; }; Andrea