[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7bc26f28-2541-8cc4-3cde-abbe4bdf8911@kernel.org>
Date: Tue, 17 Jan 2023 11:30:36 +0200
From: Roger Quadros <rogerq@...nel.org>
To: Siddharth Vadapalli <s-vadapalli@...com>,
Vignesh Raghavendra <vigneshr@...com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh+dt@...nel.org,
krzysztof.kozlowski@...aro.org, krzysztof.kozlowski+dt@...aro.org,
nm@...com, kristo@...nel.org, nsekhar@...com,
netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
srk@...com
Subject: Re: [PATCH net-next 5/5] arm64: dts: ti: k3-am625-sk: Add cpsw3g cpts
PPS support
On 17/01/2023 07:28, Siddharth Vadapalli wrote:
> 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@...00 {
>>>>>> + ti,pps = <2 1>;
>>>>>> + };
>>>>>> };
>>>>>>
>>>>>> &cpsw_port1 {
>>>>>> @@ -464,3 +468,19 @@ partition@...0000 {
>>>>>> };
>>>>>> };
>>>>>> };
>>>>>> +
>>>>>> +#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 ?
>>
I misunderstood then. I agree with Vignesh.
>> 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.
Not in board file please. It should go in ./include/dt-bindings/pinctrl/k3.h
>
> [0] https://lwn.net/Articles/819313/
>
> Regards,
> Siddharth.
cheers,
-roger
Powered by blists - more mailing lists