All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vaishnav Achath <vaishnav.a@ti.com>
Cc: Michael Walle <mwalle@kernel.org>,
	"Russell King (Oracle)" <linux@armlinux.org.uk>,
	Ayush Singh <ayushdevel1325@gmail.com>,
	open list <linux-kernel@vger.kernel.org>,
	jkridner@beagleboard.org, robertcnelson@beagleboard.org,
	lorforlinux@beagleboard.org, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>, Nishanth Menon <nm@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Tero Kristo <kristo@kernel.org>,
	Derek Kiernan <derek.kiernan@amd.com>,
	Dragan Cvetic <dragan.cvetic@amd.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mark Brown <broonie@kernel.org>, Johan Hovold <johan@kernel.org>,
	Alex Elder <elder@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"moderated list:ARM/TEXAS INSTRUMENTS K3 ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	"open list:SPI SUBSYSTEM" <linux-spi@vger.kernel.org>,
	"moderated list:GREYBUS SUBSYSTEM" <greybus-dev@lists.linaro.org>,
	Vaishnav M A <vaishnav@beagleboard.org>
Subject: Re: [PATCH v4 1/5] dt-bindings: misc: Add mikrobus-connector
Date: Thu, 21 Mar 2024 13:55:58 +0100	[thread overview]
Message-ID: <3904c7eb-c179-4596-ba42-d6b545a562a6@lunn.ch> (raw)
In-Reply-To: <ef6a1c28-70dc-4077-b644-2704ac3cf30f@ti.com>

> > How will the ethernet boards ([1], [2]) work? Where do they get
> > their MAC address from, for example. The DT has some nice properties
> > for that, but I doubt that will be possible with the manifest files.
> > I've looked at the manifest file for the w5500 board [3] and to me
> > it looks like that board will come up with a random MAC address on
> > each start. Thus, even today, you have some boards which require
> > a more complex description.
> > 
> 
> Agreed, this is a limitation, unless the corresponding drivers/subsystems
> use device_property_read_* helper to fetch properties, it will not work and
> net/core/of_net.c only implements of_get_* helpers even though the
> underlying functions can be implemented with equivalent
> device_property_read_* equivalent as well.

I think this is a good example of the limitations. For an Ethernet
NIC, you often want to describe properties of both the MAC and the
PHY. What phy-mode should be used, what delays on the RGMII bus, what
LEDs are there etc. This is a pretty much solved problem with DT, we
have a well defined sub tree to represent the MAC, the MDIO bus and
the PHY on the bus.

But we do have two classes of properties here. The MAC address is
unique to a board. So that does need to be stored in the EEPROM, and
cannot be in a one time converted manifest to DT file stored in
/lib/firmware. However, to some extent, this is a solved problem. We
have a DT representation of how to look in an EEPROM to find the MAC
address. So the DT just needs to point to some bytes in the manifest
in the EEPROM.

	Andrew

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch>
To: Vaishnav Achath <vaishnav.a@ti.com>
Cc: Michael Walle <mwalle@kernel.org>,
	"Russell King (Oracle)" <linux@armlinux.org.uk>,
	Ayush Singh <ayushdevel1325@gmail.com>,
	open list <linux-kernel@vger.kernel.org>,
	jkridner@beagleboard.org, robertcnelson@beagleboard.org,
	lorforlinux@beagleboard.org, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>, Nishanth Menon <nm@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Tero Kristo <kristo@kernel.org>,
	Derek Kiernan <derek.kiernan@amd.com>,
	Dragan Cvetic <dragan.cvetic@amd.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mark Brown <broonie@kernel.org>, Johan Hovold <johan@kernel.org>,
	Alex Elder <elder@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"moderated list:ARM/TEXAS INSTRUMENTS K3 ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	"open list:SPI SUBSYSTEM" <linux-spi@vger.kernel.org>,
	"moderated list:GREYBUS SUBSYSTEM" <greybus-dev@lists.linaro.org>,
	Vaishnav M A <vaishnav@beagleboard.org>
Subject: Re: [PATCH v4 1/5] dt-bindings: misc: Add mikrobus-connector
Date: Thu, 21 Mar 2024 13:55:58 +0100	[thread overview]
Message-ID: <3904c7eb-c179-4596-ba42-d6b545a562a6@lunn.ch> (raw)
In-Reply-To: <ef6a1c28-70dc-4077-b644-2704ac3cf30f@ti.com>

> > How will the ethernet boards ([1], [2]) work? Where do they get
> > their MAC address from, for example. The DT has some nice properties
> > for that, but I doubt that will be possible with the manifest files.
> > I've looked at the manifest file for the w5500 board [3] and to me
> > it looks like that board will come up with a random MAC address on
> > each start. Thus, even today, you have some boards which require
> > a more complex description.
> > 
> 
> Agreed, this is a limitation, unless the corresponding drivers/subsystems
> use device_property_read_* helper to fetch properties, it will not work and
> net/core/of_net.c only implements of_get_* helpers even though the
> underlying functions can be implemented with equivalent
> device_property_read_* equivalent as well.

I think this is a good example of the limitations. For an Ethernet
NIC, you often want to describe properties of both the MAC and the
PHY. What phy-mode should be used, what delays on the RGMII bus, what
LEDs are there etc. This is a pretty much solved problem with DT, we
have a well defined sub tree to represent the MAC, the MDIO bus and
the PHY on the bus.

But we do have two classes of properties here. The MAC address is
unique to a board. So that does need to be stored in the EEPROM, and
cannot be in a one time converted manifest to DT file stored in
/lib/firmware. However, to some extent, this is a solved problem. We
have a DT representation of how to look in an EEPROM to find the MAC
address. So the DT just needs to point to some bytes in the manifest
in the EEPROM.

	Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2024-03-21 12:56 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-17 19:37 [PATCH v4 0/5] misc: Add mikroBUS driver Ayush Singh
2024-03-17 19:37 ` Ayush Singh
2024-03-17 19:37 ` [PATCH v4 1/5] dt-bindings: misc: Add mikrobus-connector Ayush Singh
2024-03-17 19:37   ` Ayush Singh
2024-03-18 12:22   ` Michael Walle
2024-03-18 12:22     ` Michael Walle
2024-03-18 17:20     ` Ayush Singh
2024-03-18 17:20       ` Ayush Singh
2024-03-19  5:58       ` Krzysztof Kozlowski
2024-03-19  5:58         ` Krzysztof Kozlowski
2024-03-19  7:36         ` Ayush Singh
2024-03-19  7:36           ` Ayush Singh
2024-03-19  9:38           ` Michael Walle
2024-03-19  9:38             ` Michael Walle
2024-03-19 11:36             ` Ayush Singh
2024-03-19 11:36               ` Ayush Singh
2024-03-19 12:08               ` Michael Walle
2024-03-19 12:08                 ` Michael Walle
2024-03-19 13:03                 ` Ayush Singh
2024-03-19 13:03                   ` Ayush Singh
2024-03-19 14:21                   ` Michael Walle
2024-03-19 14:21                     ` Michael Walle
2024-03-19 17:19                     ` Vaishnav Achath
2024-03-19 17:19                       ` Vaishnav Achath
2024-03-19 17:35                       ` Ayush Singh
2024-03-19 17:35                         ` Ayush Singh
2024-03-19 19:32                         ` Andrew Lunn
2024-03-19 19:32                           ` Andrew Lunn
2024-03-20 16:39                           ` Ayush Singh
2024-03-20 16:39                             ` Ayush Singh
2024-03-20 18:44                             ` Andrew Lunn
2024-03-20 18:44                               ` Andrew Lunn
2024-03-21  7:35                               ` Vaishnav Achath
2024-03-21  7:35                                 ` Vaishnav Achath
2024-03-21 12:31                                 ` Andrew Lunn
2024-03-21 12:31                                   ` Andrew Lunn
2024-03-19 12:25       ` Andrew Lunn
2024-03-19 12:25         ` Andrew Lunn
2024-03-19 17:35         ` Vaishnav Achath
2024-03-19 17:35           ` Vaishnav Achath
2024-03-19 18:19           ` Conor Dooley
2024-03-19 18:19             ` Conor Dooley
2024-03-21  6:30             ` Vaishnav Achath
2024-03-21  6:30               ` Vaishnav Achath
2024-03-19 19:23           ` Andrew Lunn
2024-03-19 19:23             ` Andrew Lunn
2024-03-21  7:07             ` Vaishnav Achath
2024-03-21  7:07               ` Vaishnav Achath
2024-03-21  9:38               ` Michael Walle
2024-03-21  9:38                 ` Michael Walle
2024-03-21 11:55                 ` Vaishnav Achath
2024-03-21 11:55                   ` Vaishnav Achath
2024-03-21 12:44                   ` Michael Walle
2024-03-21 12:44                     ` Michael Walle
2024-03-21 12:55                   ` Andrew Lunn [this message]
2024-03-21 12:55                     ` Andrew Lunn
2024-03-19  6:03   ` Krzysztof Kozlowski
2024-03-19  6:03     ` Krzysztof Kozlowski
2024-03-19  6:42     ` Ayush Singh
2024-03-19  6:42       ` Ayush Singh
2024-03-19 19:37   ` Conor Dooley
2024-03-19 19:37     ` Conor Dooley
2024-03-22 18:15   ` Ayush Singh
2024-03-22 18:15     ` Ayush Singh
2024-03-22 18:51     ` Andrew Lunn
2024-03-22 18:51       ` Andrew Lunn
2024-03-17 19:37 ` [PATCH v4 2/5] spi: Make of_find_spi_controller_by_node() available Ayush Singh
2024-03-17 19:37   ` Ayush Singh
2024-03-19  8:16   ` Markus Elfring
2024-03-19  8:16     ` Markus Elfring
2024-03-17 19:37 ` [PATCH v4 3/5] greybus: Add mikroBUS manifest types Ayush Singh
2024-03-17 19:37   ` Ayush Singh
2024-03-19  8:26   ` Vaishnav Achath
2024-03-19  8:26     ` Vaishnav Achath
2024-03-17 19:37 ` [PATCH v4 4/5] mikrobus: Add mikroBUS driver Ayush Singh
2024-03-17 19:37   ` Ayush Singh
2024-03-17 19:59   ` Randy Dunlap
2024-03-17 19:59     ` Randy Dunlap
2024-03-18 17:34   ` Markus Elfring
2024-03-18 17:34     ` Markus Elfring
2024-03-18 17:58   ` Markus Elfring
2024-03-18 17:58     ` Markus Elfring
2024-03-18 18:41     ` Alex Elder
2024-03-18 18:41       ` Alex Elder
2024-03-18 18:55       ` Greg Kroah-Hartman
2024-03-18 18:55         ` Greg Kroah-Hartman
2024-03-18 18:12   ` Markus Elfring
2024-03-18 18:12     ` Markus Elfring
2024-03-19  6:04   ` Krzysztof Kozlowski
2024-03-19  6:04     ` Krzysztof Kozlowski
2024-03-19  6:47     ` Ayush Singh
2024-03-19  6:47       ` Ayush Singh
2024-03-19  8:00       ` Vaishnav Achath
2024-03-19  8:00         ` Vaishnav Achath
2024-03-20  7:33       ` Krzysztof Kozlowski
2024-03-20  7:33         ` Krzysztof Kozlowski
2024-03-19  8:49   ` Vaishnav Achath
2024-03-19  8:49     ` Vaishnav Achath
2024-03-17 19:37 ` [PATCH v4 5/5] dts: ti: k3-am625-beagleplay: Add mikroBUS Ayush Singh
2024-03-17 19:37   ` Ayush Singh
2024-03-19  5:59   ` Krzysztof Kozlowski
2024-03-19  5:59     ` Krzysztof Kozlowski
2024-03-19  6:34     ` Ayush Singh
2024-03-19  6:34       ` Ayush Singh
2024-03-20  7:31       ` Krzysztof Kozlowski
2024-03-20  7:31         ` Krzysztof Kozlowski

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=3904c7eb-c179-4596-ba42-d6b545a562a6@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=ayushdevel1325@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=derek.kiernan@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@amd.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=jkridner@beagleboard.org \
    --cc=johan@kernel.org \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lorforlinux@beagleboard.org \
    --cc=mwalle@kernel.org \
    --cc=nm@ti.com \
    --cc=robertcnelson@beagleboard.org \
    --cc=robh@kernel.org \
    --cc=vaishnav.a@ti.com \
    --cc=vaishnav@beagleboard.org \
    --cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.