[PATCH] dt-bindings: mfd: syscon: Add ti,am62p-cpsw-mac-efuse compatible

Siddharth Vadapalli s-vadapalli at ti.com
Tue Apr 2 05:30:02 PDT 2024


On Tue, Apr 02, 2024 at 02:08:32PM +0200, Krzysztof Kozlowski wrote:
> On 02/04/2024 12:57, Siddharth Vadapalli wrote:
> > The CTRLMMR_MAC_IDx registers within the CTRL_MMR space of TI's AM62p SoC
> > contain the MAC Address programmed in the eFuse. Add compatible for
> > allowing the CPSW driver to obtain a regmap for the CTRLMMR_MAC_IDx
> > registers within the System Controller device-tree node. The default MAC
> > Address for the interface corresponding to the first MAC port will be set
> > to the value programmed in the eFuse.
> > 
> > Signed-off-by: Siddharth Vadapalli <s-vadapalli at ti.com>
> > ---
> > 
> > This patch is based on linux-next tagged next-20240402.
> 
> Where is the DTS using it?

The current implementation in the device-tree for older TI K3 SoCs is as
follows:

	cpsw_port1: port at 1 {
		reg = <1>;
		ti,mac-only;
		label = "port1";
		phys = <&phy_gmii_sel 1>;
		mac-address = [00 00 00 00 00 00];
		ti,syscon-efuse = <&wkup_conf 0x200>;
	};

The "ti,syscon-efuse" property passes the reference to the System
Controller node as well as the offset to the CTRLMMR_MAC_IDx registers
within the CTRL_MMR space.

This implementation works only when the System Controller node
(wkup_conf or its equivalent depending on the SoC) has the compatible
"syscon". From AM62p SoC onwards, it was decided that the System
Controller nodes have to be modelled as a "simple-bus", due to which the
"syscon" based regmapping within the driver that uses the
"ti,syscon-efuse" property will no longer work directly. Therefore, with
this patch, the upcoming device-tree changes for AM62p will be:

1) Update in the System Controller node to use the newly added
compatible for mapping the CTRLMMR_MAC_IDx registers:

	wkup_conf: bus at 43000000 {
		compatible = "simple-bus";
		reg = <0x00 0x43000000 0x00 0x20000>;
		#address-cells = <1>;
		#size-cells = <1>;
		ranges = <0x00 0x00 0x43000000 0x20000>;
		bootph-all;

		chipid: chipid at 14 {
                        reg = <0x14 0x4>;
                        bootph-all;
                };
+
+               cpsw_mac_efuse: cpsw-mac-efuse at 200 {
+                       compatible = "ti,am62p-cpsw-mac-efuse", "syscon";
+                       reg = <0x200 0x8>;
+               };
        };

2) Update within the cpsw_port1 node for passing the "cpsw_mac_efuse"
node:

		cpsw_port1: port at 1 {
			reg = <1>;
			ti,mac-only;
			label = "port1";
			phys = <&phy_gmii_sel 1>;
			mac-address = [00 00 00 00 00 00];
+			ti,syscon-efuse = <&cpsw_mac_efuse 0x0>;
		};

> 
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>

Thank you for reviewing and acking this patch.

Regards,
Siddharth.



More information about the linux-arm-kernel mailing list