Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1400655 > unrolled thread
| Started by | Harini Katakam <harini.katakam@xilinx.com> |
|---|---|
| First post | 2016-05-13 11:50 +0200 |
| Last post | 2016-05-14 05:00 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings Harini Katakam <harini.katakam@xilinx.com> - 2016-05-13 11:50 +0200
Re: [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings Andrew Lunn <andrew@lunn.ch> - 2016-05-13 19:40 +0200
Re: [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings Andrew Lunn <andrew@lunn.ch> - 2016-05-13 19:50 +0200
Re: [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings Harini Katakam <harinikatakamlinux@gmail.com> - 2016-05-14 05:00 +0200
| From | Harini Katakam <harini.katakam@xilinx.com> |
|---|---|
| Date | 2016-05-13 11:50 +0200 |
| Subject | [RFC PATCH 2/2] Documentation: devictree: Add macb mdio bindings |
| Message-ID | <ryhTk-Lw-5@gated-at.bofh.it> |
Add documentations for macb mdio driver.
Signed-off-by: Harini Katakam <harinik@xilinx.com>
---
.../devicetree/bindings/net/macb-mdio.txt | 31 ++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/macb-mdio.txt
diff --git a/Documentation/devicetree/bindings/net/macb-mdio.txt b/Documentation/devicetree/bindings/net/macb-mdio.txt
new file mode 100644
index 0000000..11c70a3
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/macb-mdio.txt
@@ -0,0 +1,31 @@
+* Cadence MACB MDIO controller
+
+Required properties:
+- compatible: Should be "cdns,macb-mdio"
+- reg: Address and length of the register set of MAC to be used
+- clock-names: Tuple listing input clock names.
+ Required elements: 'pclk', 'hclk'
+ Optional elements: 'tx_clk'
+- clocks: Phandles to input clocks.
+
+Examples:
+
+ mdio {
+ compatible = "cdns,macb-mdio";
+ reg = <0x0 0xff0b0000 0x0 0x1000>;
+ clocks = <&clk125>, <&clk125>, <&clk125>;
+ clock-names = "pclk", "hclk", "tx_clk";
+ ethernet_phyC: ethernet-phy@C {
+ reg = <C>;
+ };
+ ethernet_phy7: ethernet-phy@7 {
+ reg = <7>;
+ };
+ ethernet_phy3: ethernet-phy@3 {
+ reg = <3>;
+ };
+ ethernet_phy8: ethernet-phy@8 {
+ reg = <8>;
+ };
+ };
+
--
1.7.9.5
[toc] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2016-05-13 19:40 +0200 |
| Message-ID | <rypea-8bu-25@gated-at.bofh.it> |
| In reply to | #1400655 |
> + mdio {
> + compatible = "cdns,macb-mdio";
> + reg = <0x0 0xff0b0000 0x0 0x1000>;
> + clocks = <&clk125>, <&clk125>, <&clk125>;
> + clock-names = "pclk", "hclk", "tx_clk";
> + ethernet_phyC: ethernet-phy@C {
> + reg = <C>;
I think that needs an 0x prefix.
Andrew
[toc] | [prev] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2016-05-13 19:50 +0200 |
| Message-ID | <rypnP-8fB-3@gated-at.bofh.it> |
| In reply to | #1400655 |
Hi Harini
Is this backward compatible? Will devices using the old binding still
work?
/* Disable RX and TX (XXX: Should we halt the transmission
* more gracefully?)
*/
- macb_writel(bp, NCR, 0);
+ ctrl = macb_readl(bp, NCR);
+ ctrl &= ~(MACB_BIT(RE) | MACB_BIT(TE));
+ macb_writel(bp, NCR, ctrl);
/* Clear the stats registers (XXX: Update stats first?) */
- macb_writel(bp, NCR, MACB_BIT(CLRSTAT));
+ ctrl |= MACB_BIT(CLRSTAT);
+ macb_writel(bp, NCR, ctrl);
/* Clear all status flags */
macb_writel(bp, TSR, -1);
It is not clear to me what this part has to do with MDIO.
Andrew
[toc] | [prev] | [next] | [standalone]
| From | Harini Katakam <harinikatakamlinux@gmail.com> |
|---|---|
| Date | 2016-05-14 05:00 +0200 |
| Message-ID | <ryxY6-8i8-3@gated-at.bofh.it> |
| In reply to | #1400922 |
HI Andrew, On Fri, May 13, 2016 at 11:13 PM, Andrew Lunn <andrew@lunn.ch> wrote: > Hi Harini > > Is this backward compatible? Will devices using the old binding still > work? It isn't right now. I will have to assign the bus read/write functions conditionally in order to do that - I'll see if I can make it clean. > > /* Disable RX and TX (XXX: Should we halt the transmission > * more gracefully?) > */ > - macb_writel(bp, NCR, 0); > + ctrl = macb_readl(bp, NCR); > + ctrl &= ~(MACB_BIT(RE) | MACB_BIT(TE)); > + macb_writel(bp, NCR, ctrl); > > /* Clear the stats registers (XXX: Update stats first?) */ > - macb_writel(bp, NCR, MACB_BIT(CLRSTAT)); > + ctrl |= MACB_BIT(CLRSTAT); > + macb_writel(bp, NCR, ctrl); > > /* Clear all status flags */ > macb_writel(bp, TSR, -1); > > It is not clear to me what this part has to do with MDIO. > Sorry, I'll move this to a separate patch in my next version. It is intended to write those registers without disturbing reserved bits. Regards, Harini
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web