From: Rob Herring <robh@kernel.org>
To: Michael Heimpold <mhei@heimpold.de>
Cc: Jonathan Cameron <jic23@kernel.org>,
"Andrew F . Davis" <afd@ti.com>, Mark Brown <broonie@kernel.org>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH v2 net-next] net: ethernet: enc28j60: add device tree support
Date: Mon, 25 Apr 2016 08:23:26 -0500 [thread overview]
Message-ID: <20160425132326.GA17445@rob-hp-laptop> (raw)
In-Reply-To: <1461533283-24852-1-git-send-email-mhei@heimpold.de>
On Sun, Apr 24, 2016 at 11:28:03PM +0200, Michael Heimpold wrote:
> The following patch adds the required match table for device tree support
> (and while at, fix the indent). It's also possible to specify the
> MAC address in the DT blob.
>
> Also add the corresponding binding documentation file.
>
> Signed-off-by: Michael Heimpold <mhei@heimpold.de>
> ---
>
> v2: * took care of Arnd Bergmann's review comments
> - allow to specify MAC address via DT
> - unconditionally define DT id table
> * increased the driver version minor number
> * driver author's email address bounces, removed from address list
>
> .../devicetree/bindings/net/microchip-enc28j60.txt | 50 ++++++++++++++++++++++
Matching the compatible string is preferred here: microchip,enc28j60.txt
> drivers/net/ethernet/microchip/enc28j60.c | 20 +++++++--
> 2 files changed, 67 insertions(+), 3 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/net/microchip-enc28j60.txt
>
> diff --git a/Documentation/devicetree/bindings/net/microchip-enc28j60.txt b/Documentation/devicetree/bindings/net/microchip-enc28j60.txt
> new file mode 100644
> index 0000000..847a97b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/microchip-enc28j60.txt
> @@ -0,0 +1,50 @@
> +* Microchip ENC28J60
> +
> +This is a standalone 10 MBit ethernet controller with SPI interface.
> +
> +For each device connected to a SPI bus, define a child node within
> +the SPI master node.
> +
> +Required properties:
> +- compatible: Should be "microchip,enc28j60"
> +- reg: Specify the SPI chip select the ENC28J60 is wired to
> +- interrupts: Specify the interrupt and interrupt type (usually falling edge)
> +
> +Optional properties:
> +- interrupt-parent: Specify the pHandle of the source interrupt
This is required in the sense that either the node or a parent node must
define it. In this case, since the SPI controller likely has a different
parent, you will pretty much always need it defined in this node.
> +- spi-max-frequency: Maximum frequency of the SPI bus when accessing the ENC28J60.
> + According to the ENC28J80 datasheet, the chip allows a maximum of 20 MHz, however,
> + board designs may need to limit this value.
> +- local-mac-address: See ethernet.txt in the same directory.
> +
> +
> +Example (for NXP i.MX28 with pin control stuff for GPIO irq):
> +
> + ssp2: ssp@80014000 {
> + compatible = "fsl,imx28-spi";
> + pinctrl-names = "default";
> + pinctrl-0 = <&spi2_pins_b &spi2_sck_cfg>;
> + status = "okay";
> +
> + enc28j60: ethernet@0 {
> + compatible = "microchip,enc28j60";
> + pinctrl-names = "default";
> + pinctrl-0 = <&enc28j60_pins>;
Need to document using the pinctrl binding.
> + reg = <0>;
> + interrupt-parent = <&gpio3>;
> + interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
> + spi-max-frequency = <12000000>;
> + };
> + };
> +
next prev parent reply other threads:[~2016-04-25 13:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1461447800-11381-1-git-send-email-mhei@heimpold.de>
2016-04-23 21:43 ` [PATCH net-next 2/2] net: ethernet: enc28j60: add device tree support Michael Heimpold
2016-04-23 22:20 ` Arnd Bergmann
2016-04-24 21:28 ` [PATCH v2 net-next] " Michael Heimpold
2016-04-25 13:23 ` Rob Herring [this message]
2016-04-25 18:41 ` Michael Heimpold
[not found] ` <1461533283-24852-1-git-send-email-mhei-Z/Lg1yOAjpkb1SvskN2V4Q@public.gmane.org>
2016-04-25 15:39 ` Andrew F. Davis
2016-04-25 17:46 ` Michael Heimpold
2016-04-25 18:04 ` Andrew F. Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160425132326.GA17445@rob-hp-laptop \
--to=robh@kernel.org \
--cc=afd@ti.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jic23@kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhei@heimpold.de \
--cc=netdev@vger.kernel.org \
--cc=pawel.moll@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox