All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	linux-amlogic@lists.infradead.org,
	Kevin Hilman <khilman@baylibre.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Da Xue <da@lessconfused.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 0/2] net: mdio: add amlogic gxl mdio mux support
Date: Mon, 16 Jan 2023 10:16:34 +0100	[thread overview]
Message-ID: <20230116091637.272923-1-jbrunet@baylibre.com> (raw)

Add support for the MDIO multiplexer found in the Amlogic GXL SoC family.
This multiplexer allows to choose between the external (SoC pins) MDIO bus,
or the internal one leading to the integrated 10/100M PHY.

This multiplexer has been handled with the mdio-mux-mmioreg generic driver
so far. When it was added, it was thought the logic was handled by a
single register.

It turns out more than a single register need to be properly set.
As long as the device is using the Amlogic vendor bootloader, or upstream
u-boot with net support, it is working fine since the kernel is inheriting
the bootloader settings. Without net support in the bootloader, this glue
comes unset in the kernel and only the external path may operate properly.

With this driver (and the associated DT update), the kernel no longer relies
on the bootloader to set things up, fixing the problem.

This has been tested on the aml-s905x-cc (LePotato) for the internal path
and the aml-s912-pc (Tartiflette) for the external path.

Jerome Brunet (2):
  dt-bindings: net: add amlogic gxl mdio multiplexer
  net: mdio: add amlogic gxl mdio mux support

 .../bindings/net/amlogic,gxl-mdio-mux.yaml    |  64 +++++++
 drivers/net/mdio/Kconfig                      |  11 ++
 drivers/net/mdio/Makefile                     |   1 +
 drivers/net/mdio/mdio-mux-meson-gxl.c         | 160 ++++++++++++++++++
 4 files changed, 236 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/amlogic,gxl-mdio-mux.yaml
 create mode 100644 drivers/net/mdio/mdio-mux-meson-gxl.c

-- 
2.39.0


WARNING: multiple messages have this Message-ID (diff)
From: Jerome Brunet <jbrunet@baylibre.com>
To: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	linux-amlogic@lists.infradead.org,
	Kevin Hilman <khilman@baylibre.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Da Xue <da@lessconfused.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 0/2] net: mdio: add amlogic gxl mdio mux support
Date: Mon, 16 Jan 2023 10:16:34 +0100	[thread overview]
Message-ID: <20230116091637.272923-1-jbrunet@baylibre.com> (raw)

Add support for the MDIO multiplexer found in the Amlogic GXL SoC family.
This multiplexer allows to choose between the external (SoC pins) MDIO bus,
or the internal one leading to the integrated 10/100M PHY.

This multiplexer has been handled with the mdio-mux-mmioreg generic driver
so far. When it was added, it was thought the logic was handled by a
single register.

It turns out more than a single register need to be properly set.
As long as the device is using the Amlogic vendor bootloader, or upstream
u-boot with net support, it is working fine since the kernel is inheriting
the bootloader settings. Without net support in the bootloader, this glue
comes unset in the kernel and only the external path may operate properly.

With this driver (and the associated DT update), the kernel no longer relies
on the bootloader to set things up, fixing the problem.

This has been tested on the aml-s905x-cc (LePotato) for the internal path
and the aml-s912-pc (Tartiflette) for the external path.

Jerome Brunet (2):
  dt-bindings: net: add amlogic gxl mdio multiplexer
  net: mdio: add amlogic gxl mdio mux support

 .../bindings/net/amlogic,gxl-mdio-mux.yaml    |  64 +++++++
 drivers/net/mdio/Kconfig                      |  11 ++
 drivers/net/mdio/Makefile                     |   1 +
 drivers/net/mdio/mdio-mux-meson-gxl.c         | 160 ++++++++++++++++++
 4 files changed, 236 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/amlogic,gxl-mdio-mux.yaml
 create mode 100644 drivers/net/mdio/mdio-mux-meson-gxl.c

-- 
2.39.0


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

             reply	other threads:[~2023-01-16  9:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16  9:16 Jerome Brunet [this message]
2023-01-16  9:16 ` [PATCH net-next 0/2] net: mdio: add amlogic gxl mdio mux support Jerome Brunet
2023-01-16  9:16 ` [PATCH net-next 1/2] dt-bindings: net: add amlogic gxl mdio multiplexer Jerome Brunet
2023-01-16  9:16   ` Jerome Brunet
2023-01-17  8:31   ` Krzysztof Kozlowski
2023-01-17  8:31     ` Krzysztof Kozlowski
2023-01-17  9:05     ` Jerome Brunet
2023-01-17  9:05       ` Jerome Brunet
2023-01-17 10:39       ` Krzysztof Kozlowski
2023-01-17 10:39         ` Krzysztof Kozlowski
2023-01-16  9:16 ` [PATCH net-next 2/2] net: mdio: add amlogic gxl mdio mux support Jerome Brunet
2023-01-16  9:16   ` Jerome Brunet
2023-01-16 12:11   ` Simon Horman
2023-01-16 12:11     ` Simon Horman
2023-01-16 13:27     ` Jerome Brunet
2023-01-16 13:27       ` Jerome Brunet
2023-01-16 13:51       ` Simon Horman
2023-01-16 13:51         ` Simon Horman
2023-01-18  2:56         ` Andrew Lunn
2023-01-18  2:56           ` Andrew Lunn
2023-01-18 12:41           ` Simon Horman
2023-01-18 12:41             ` Simon Horman
2023-01-18  3:02   ` Andrew Lunn
2023-01-18  3:02     ` Andrew Lunn
2023-01-19 10:55     ` Jerome Brunet
2023-01-19 10:55       ` Jerome Brunet
2023-01-19 17:17       ` Andrew Lunn
2023-01-19 17:17         ` Andrew Lunn
2023-01-20 10:16         ` Jerome Brunet
2023-01-20 10:16           ` Jerome Brunet
2023-01-18  3:08 ` [PATCH net-next 0/2] " Andrew Lunn
2023-01-18  3:08   ` Andrew Lunn
2023-01-19 10:42   ` Jerome Brunet
2023-01-19 10:42     ` Jerome Brunet
2023-01-19 17:21     ` Andrew Lunn
2023-01-19 17:21       ` Andrew Lunn

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=20230116091637.272923-1-jbrunet@baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=da@lessconfused.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=netdev@vger.kernel.org \
    /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.