Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: Nishanth Menon <nm@ti.com>, Siddharth Vadapalli <s-vadapalli@ti.com>
Cc: <vigneshr@ti.com>, <kristo@kernel.org>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski@linaro.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <srk@ti.com>
Subject: Re: [RFC PATCH 1/2] arm64: dts: ti: k3-j721s2-main: Add main CPSW2G devicetree node
Date: Wed, 26 Apr 2023 08:21:45 -0500	[thread overview]
Message-ID: <163cfe60-4b14-fe5c-29d9-323e7ea495d5@ti.com> (raw)
In-Reply-To: <20230426125927.itfd76cpvy32zur7@scrimmage>

On 4/26/23 7:59 AM, Nishanth Menon wrote:
> On 16:27-20230426, Siddharth Vadapalli wrote:
>> From: Kishon Vijay Abraham I <kishon@ti.com>
>>
>> TI's J721S2 SoC has a MAIN CPSW2G instance of the CPSW Ethernet Switch.
>> Add devicetree node for it.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
>> ---
>>   arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 69 ++++++++++++++++++++++
>>   1 file changed, 69 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> index 6629b2989180..14dfef7b0758 100644
>> --- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
>> @@ -51,6 +51,12 @@ usb_serdes_mux: mux-controller@0 {
>>   			mux-reg-masks = <0x0 0x8000000>; /* USB0 to SERDES0 lane 1/3 mux */
>>   		};
>>   
>> +		phy_gmii_sel_cpsw: phy@34 {
>> +			compatible = "ti,am654-phy-gmii-sel";
>> +			reg = <0x34 0x4>;
>> +			#phy-cells = <1>;
>> +		};
> 
> 
> See this thread: https://lore.kernel.org/all/76da0b98-3274-b047-db11-ecabc117ae11@ti.com/
> 

"ti,am654-phy-gmii-sel" already has "reg", so this DT is good as is.
Adding the driver fallback to use that when the parent is not a "syscon"
node should be as easy as this:

--- a/drivers/phy/ti/phy-gmii-sel.c
+++ b/drivers/phy/ti/phy-gmii-sel.c
@@ -435,9 +435,12 @@ static int phy_gmii_sel_probe(struct platform_device *pdev)
  
         priv->regmap = syscon_node_to_regmap(node->parent);
         if (IS_ERR(priv->regmap)) {
-               ret = PTR_ERR(priv->regmap);
-               dev_err(dev, "Failed to get syscon %d\n", ret);
-               return ret;
+               priv->regmap = device_node_to_regmap(node);
+               if (IS_ERR(priv->regmap)) {
+                       ret = PTR_ERR(priv->regmap);
+                       dev_err(dev, "Failed to get syscon %d\n", ret);
+                       return ret;
+               }
         }


I'll send this patch when the window opens.

Andrew

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

  reply	other threads:[~2023-04-26 13:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26 10:57 [RFC PATCH 0/2] Add MAIN CPSW2G DT support for J721S2 Siddharth Vadapalli
2023-04-26 10:57 ` [RFC PATCH 1/2] arm64: dts: ti: k3-j721s2-main: Add main CPSW2G devicetree node Siddharth Vadapalli
2023-04-26 12:59   ` Nishanth Menon
2023-04-26 13:21     ` Andrew Davis [this message]
2023-04-26 10:57 ` [RFC PATCH 2/2] arm64: dts: ti: k3-j721s2: Add overlay to enable main CPSW2G with GESI Siddharth Vadapalli
2023-04-26 13:00   ` Nishanth Menon
2023-04-27  4:14     ` Siddharth Vadapalli

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=163cfe60-4b14-fe5c-29d9-323e7ea495d5@ti.com \
    --to=afd@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=srk@ti.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox