From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <olteanv@gmail.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Matthias Brugger <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno,"
<angelogioacchino.delregno@collabora.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
upstream@airoha.com
Subject: Re: [net-next PATCH v10 7/9] nvmem: an8855: Add support for Airoha AN8855 Switch EFUSE
Date: Sun, 8 Dec 2024 16:17:28 +0100 [thread overview]
Message-ID: <118552cc-e060-45fa-b93f-9187011f2c8c@wanadoo.fr> (raw)
In-Reply-To: <20241208002105.18074-8-ansuelsmth@gmail.com>
Le 08/12/2024 à 01:20, Christian Marangi a écrit :
> Add support for Airoha AN8855 Switch EFUSE. These EFUSE might be used
> for calibration data for the internal switch PHYs.
>
> Signed-off-by: Christian Marangi <ansuelsmth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> MAINTAINERS | 1 +
> drivers/nvmem/Kconfig | 11 +++++++
> drivers/nvmem/Makefile | 2 ++
> drivers/nvmem/an8855-efuse.c | 63 ++++++++++++++++++++++++++++++++++++
> 4 files changed, 77 insertions(+)
> create mode 100644 drivers/nvmem/an8855-efuse.c
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 38c7b2362c92..a67d147276a1 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -723,6 +723,7 @@ F: Documentation/devicetree/bindings/net/dsa/airoha,an8855-switch.yaml
> F: Documentation/devicetree/bindings/nvmem/airoha,an8855-efuse.yaml
> F: drivers/mfd/airoha-an8855.c
> F: drivers/net/mdio/mdio-an8855.c
> +F: drivers/nvmem/an8855-efuse.c
>
> AIROHA ETHERNET DRIVER
> M: Lorenzo Bianconi <lorenzo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
> index 8671b7c974b9..599014970c22 100644
> --- a/drivers/nvmem/Kconfig
> +++ b/drivers/nvmem/Kconfig
> @@ -28,6 +28,17 @@ source "drivers/nvmem/layouts/Kconfig"
>
> # Devices
>
> +config NVMEM_AN8855_EFUSE
> + tristate "Airoha AN8855 eFuse support"
> + depends on MFD_AIROHA_AN8855 || COMPILE_TEST
> + help
> + Say y here to enable support for reading eFuses on Airoha AN8855
> + Switch. These are e.g. used to store factory programmed
> + calibration data required for the PHY.
> +
> + This driver can also be built as a module. If so, the module will
> + be called nvmem-apple-efuse.
nvmem-an8855-efuse?
> +
> config NVMEM_APPLE_EFUSES
> tristate "Apple eFuse support"
> depends on ARCH_APPLE || COMPILE_TEST
> diff --git a/drivers/nvmem/Makefile b/drivers/nvmem/Makefile
> index 5b77bbb6488b..c732132c0e45 100644
> --- a/drivers/nvmem/Makefile
> +++ b/drivers/nvmem/Makefile
> @@ -10,6 +10,8 @@ nvmem_layouts-y := layouts.o
> obj-y += layouts/
>
> # Devices
> +obj-$(CONFIG_NVMEM_AN8855_EFUSE) += nvmem-an8855-efuse.o
> +nvmem-an8855-efuse-y := an8855-efuse.o
> obj-$(CONFIG_NVMEM_APPLE_EFUSES) += nvmem-apple-efuses.o
> nvmem-apple-efuses-y := apple-efuses.o
> obj-$(CONFIG_NVMEM_BCM_OCOTP) += nvmem-bcm-ocotp.o
...
> +static int an8855_efuse_probe(struct platform_device *pdev)
> +{
> + struct nvmem_config an8855_nvmem_config = {
> + .name = "an8855-efuse",
> + .size = AN8855_EFUSE_CELL * sizeof(u32),
> + .stride = sizeof(u32),
> + .word_size = sizeof(u32),
> + .reg_read = an8855_efuse_read,
> + };
> + struct device *dev = &pdev->dev;
> + struct nvmem_device *nvmem;
> +
> + /* Assign NVMEM priv to MFD regmap */
> + an8855_nvmem_config.priv = dev_get_regmap(dev->parent, NULL);
> + an8855_nvmem_config.dev = dev;
> + nvmem = devm_nvmem_register(dev, &an8855_nvmem_config);
> +
> + return PTR_ERR_OR_ZERO(nvmem);
> +}
> +
> +static const struct of_device_id an8855_efuse_of_match[] = {
> + { .compatible = "airoha,an8855-efuse", },
> + {/* sentinel */},
No need for the ending comma.
> +};
> +MODULE_DEVICE_TABLE(of, an8855_efuse_of_match);
...
CJ
next prev parent reply other threads:[~2024-12-08 15:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-08 0:20 [net-next PATCH v10 0/9] net: dsa: Add Airoha AN8855 support Christian Marangi
2024-12-08 0:20 ` [net-next PATCH v10 1/9] dt-bindings: nvmem: Document support for Airoha AN8855 Switch EFUSE Christian Marangi
2024-12-08 0:20 ` [net-next PATCH v10 2/9] dt-bindings: net: Document support for Airoha AN8855 Switch Virtual MDIO Christian Marangi
2024-12-08 16:02 ` Andrew Lunn
2024-12-08 0:20 ` [net-next PATCH v10 3/9] dt-bindings: net: dsa: Document support for Airoha AN8855 DSA Switch Christian Marangi
2024-12-08 0:20 ` [net-next PATCH v10 4/9] dt-bindings: mfd: Document support for Airoha AN8855 Switch SoC Christian Marangi
2024-12-08 1:47 ` Rob Herring (Arm)
2024-12-08 0:20 ` [net-next PATCH v10 5/9] mfd: an8855: Add support for Airoha AN8855 Switch MFD Christian Marangi
2024-12-08 15:09 ` Christophe JAILLET
2024-12-08 15:12 ` Christian Marangi
2024-12-08 15:38 ` Christophe JAILLET
2024-12-08 0:20 ` [net-next PATCH v10 6/9] net: mdio: Add Airoha AN8855 Switch MDIO Passtrough Christian Marangi
2024-12-08 15:13 ` Christophe JAILLET
2024-12-08 0:20 ` [net-next PATCH v10 7/9] nvmem: an8855: Add support for Airoha AN8855 Switch EFUSE Christian Marangi
2024-12-08 15:17 ` Christophe JAILLET [this message]
2024-12-08 0:20 ` [net-next PATCH v10 8/9] net: dsa: Add Airoha AN8855 5-Port Gigabit DSA Switch driver Christian Marangi
2024-12-08 15:26 ` Christophe JAILLET
2024-12-09 4:38 ` kernel test robot
2024-12-09 4:42 ` kernel test robot
2024-12-08 0:20 ` [net-next PATCH v10 9/9] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY Christian Marangi
2024-12-09 4:39 ` kernel test robot
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=118552cc-e060-45fa-b93f-9187011f2c8c@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=andrew+netdev@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=upstream@airoha.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
all inboxes | Powered by JetHome®