The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Siddharth Vadapalli <s-vadapalli@ti.com>
To: Vignesh Raghavendra <vigneshr@ti.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski@linaro.org>,
	<krzysztof.kozlowski+dt@linaro.org>,
	Roger Quadros <rogerq@kernel.org>, <nm@ti.com>,
	<kristo@kernel.org>, <nsekhar@ti.com>, <netdev@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <srk@ti.com>,
	<s-vadapalli@ti.com>
Subject: Re: [PATCH net-next 5/5] arm64: dts: ti: k3-am625-sk: Add cpsw3g cpts PPS support
Date: Tue, 17 Jan 2023 10:58:38 +0530	[thread overview]
Message-ID: <566700c6-df9b-739b-81ff-8745eea10ff3@ti.com> (raw)
In-Reply-To: <4d7ac24a-0a35-323c-045c-cc5b3d3c715a@ti.com>

Vignesh,

On 16/01/23 22:00, Vignesh Raghavendra wrote:
> 
> 
> On 16/01/23 9:35 pm, Roger Quadros wrote:
>>>>> diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
>>>>> index 4f179b146cab..962a922cc94b 100644
>>>>> --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
>>>>> +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
>>>>> @@ -366,6 +366,10 @@ &cpsw3g {
>>>>>  	pinctrl-names = "default";
>>>>>  	pinctrl-0 = <&main_rgmii1_pins_default
>>>>>  		     &main_rgmii2_pins_default>;
>>>>> +
>>>>> +	cpts@3d000 {
>>>>> +		ti,pps = <2 1>;
>>>>> +	};
>>>>>  };
>>>>>  
>>>>>  &cpsw_port1 {
>>>>> @@ -464,3 +468,19 @@ partition@3fc0000 {
>>>>>  		};
>>>>>  	};
>>>>>  };
>>>>> +
>>>>> +#define TS_OFFSET(pa, val)	(0x4+(pa)*4) (0x10000 | val)
>>>> Should this go in ./include/dt-bindings/pinctrl/k3.h ?
>>>> That way every board DT file doesn't have to define it.
>>>>
>>>> The name should be made more platform specific.
>>>> e.g. K3_TS_OFFSET if it is the same for all K3 platforms.
>>>> If not then please add Platform name instead of K3.
>>> The offsets are board specific. If it is acceptable, I will add board specific
>>> macro for the TS_OFFSET definition in the ./include/dt-bindings/pinctrl/k3.h
>>> file. Please let me know.
>> If it is board specific then it should remain in the board file.
> 
> 
> The values you pass to macro maybe board specific. But the macro
> definition itself same for a given SoC right? Also, is its same across
> K3 family ?
> 
> Please use SoC specific prefix like AM62X_TS_OFFSET() or K3_TS_OFFSET()
> accordingly.

For certain SoCs including AM62X, the macro is:
#define TS_OFFSET(pa, val)	(0x4+(pa)*4) (0x10000 | val)
while for other SoCs (refer [0]), the macro is:
#define TS_OFFSET(pa, val)	(0x4+(pa)*4) (0x80000000 | val)

Therefore, I will use SoC specific prefix in the macro. Please let me know if
the SoC specific macro can be added to the ./include/dt-bindings/pinctrl/k3.h
file for each SoC. If not, I will add the SoC specific macro in the board file
itself.

[0] https://lwn.net/Articles/819313/

Regards,
Siddharth.

  reply	other threads:[~2023-01-17  5:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 11:44 [PATCH net-next 0/5] Add PPS support to am65-cpts driver Siddharth Vadapalli
2023-01-11 11:44 ` [PATCH net-next 1/5] dt-binding: net: ti: am65x-cpts: add 'ti,pps' property Siddharth Vadapalli
2023-01-13 19:16   ` Rob Herring
2023-01-11 11:44 ` [PATCH net-next 2/5] net: ethernet: ti: am65-cpts: add pps support Siddharth Vadapalli
2023-01-13  9:57   ` Roger Quadros
2023-01-16  6:23     ` Siddharth Vadapalli
2023-01-11 11:44 ` [PATCH net-next 3/5] net: ethernet: ti: am65-cpts: adjust pps following ptp changes Siddharth Vadapalli
2023-01-11 11:44 ` [PATCH net-next 4/5] arm64: dts: ti: k3-am62-main: Add timesync router node Siddharth Vadapalli
2023-05-16 13:31   ` Nishanth Menon
2023-01-11 11:44 ` [PATCH net-next 5/5] arm64: dts: ti: k3-am625-sk: Add cpsw3g cpts PPS support Siddharth Vadapalli
2023-01-13 10:18   ` Roger Quadros
2023-01-16  7:12     ` Siddharth Vadapalli
2023-01-16 16:05       ` Roger Quadros
2023-01-16 16:30         ` Vignesh Raghavendra
2023-01-17  5:28           ` Siddharth Vadapalli [this message]
2023-01-17  9:30             ` Roger Quadros
2023-01-17  9:39               ` Siddharth Vadapalli
2023-01-13  9:48 ` [PATCH net-next 0/5] Add PPS support to am65-cpts driver Roger Quadros
2023-01-13  9:56   ` Siddharth Vadapalli
2023-01-13 10:21     ` Roger Quadros

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=566700c6-df9b-739b-81ff-8745eea10ff3@ti.com \
    --to=s-vadapalli@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=nsekhar@ti.com \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@kernel.org \
    --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