mbox series

[v2,0/4] Add AM65x ICSSG Ethernet support

Message ID 20230921060913.721336-1-danishanwar@ti.com
Headers show
Series Add AM65x ICSSG Ethernet support | expand

Message

MD Danish Anwar Sept. 21, 2023, 6:09 a.m. UTC
Hi All,

This series adds support for ICSSG ethernet on AM65x SR2.0. 
This series also enables TI_ICSSG_PRUETH as loadable kernel module.
This series is based on the latest next-20230921 linux-next.

This is the v2 of the series [v1]. This addresses comments made on v1.

Changes from v1 to v2:
*) Moved ICSSG2 nodes from k3-am654-base-board.dts to new overlay file
   k3-am654-icssg2.dtso as asked by Andrew.
*) Renamed k3-am654-base-board.dts to k3-am654-common-board.dts
*) Added "Enable TI_ICSSG_PRUETH" patch to this series.

[v1] https://lore.kernel.org/all/20230911071245.2173520-1-danishanwar@ti.com/

Thanks and Regards,
MD Danish Anwar

MD Danish Anwar (4):
  arm64: dts: ti: k3-am65-main: Add ICSSG IEP nodes
  arm64: dts: ti: k3-am654-base-board: add ICSSG2 Ethernet support
  arm64: dts: ti: k3-am654-idk: Add ICSSG Ethernet ports
  arm64: defconfig: Enable TI_ICSSG_PRUETH

 arch/arm64/boot/dts/ti/Makefile               |   6 +-
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi      |  36 +++
 ...se-board.dts => k3-am654-common-board.dts} |   0
 arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso   | 145 +++++++++
 arch/arm64/boot/dts/ti/k3-am654-idk.dtso      | 296 ++++++++++++++++++
 arch/arm64/configs/defconfig                  |   1 +
 6 files changed, 483 insertions(+), 1 deletion(-)
 rename arch/arm64/boot/dts/ti/{k3-am654-base-board.dts => k3-am654-common-board.dts} (100%)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso
 create mode 100644 arch/arm64/boot/dts/ti/k3-am654-idk.dtso

base-commit: 940fcc189c51032dd0282cbee4497542c982ac59

Comments

MD Danish Anwar Sept. 25, 2023, 8:21 a.m. UTC | #1
Hi Andrew,

On 22/09/23 09:52, MD Danish Anwar wrote:
> On 21/09/23 22:57, Andrew Davis wrote:
>> On 9/21/23 1:09 AM, MD Danish Anwar wrote:
>>> ICSSG2 provides dual Gigabit Ethernet support.
>>>
>>> For support SR2.0 ICSSG Ethernet firmware:
>>> - provide different firmware blobs and use TX_PRU.
>>> - IEP0 is used as PTP Hardware Clock and can only be used for one port.
>>> - TX timestamp notification comes via INTC interrupt.
>>>
>>> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
>>> ---
>>>   arch/arm64/boot/dts/ti/Makefile               |   4 +-
>>>   ...se-board.dts => k3-am654-common-board.dts} |   0
>>>   arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso   | 145 ++++++++++++++++++
>>>   3 files changed, 148 insertions(+), 1 deletion(-)
>>>   rename arch/arm64/boot/dts/ti/{k3-am654-base-board.dts =>
>>> k3-am654-common-board.dts} (100%)
>>>   create mode 100644 arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso
>>>
>>> diff --git a/arch/arm64/boot/dts/ti/Makefile
>>> b/arch/arm64/boot/dts/ti/Makefile
>>> index e7b8e2e7f083..85c91f5e832e 100644
>>> --- a/arch/arm64/boot/dts/ti/Makefile
>>> +++ b/arch/arm64/boot/dts/ti/Makefile
>>> @@ -42,12 +42,14 @@ dtb-$(CONFIG_ARCH_K3) +=
>>> k3-am642-tqma64xxl-mbax4xxl-sdcard.dtb
>>>   dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl-wlan.dtb
>>>     # Boards with AM65x SoC
>>> -k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb
>>> k3-am654-base-board-rocktech-rk101-panel.dtbo
>>> +k3-am654-gp-evm-dtbs := k3-am654-common-board.dtb
>>> k3-am654-base-board-rocktech-rk101-panel.dtbo
>>
>> Should the k3-am654-gp-evm.dtb not also have this icssg2 support? Does
>> it work
>> to keep this line like before or is there some conflict having both
>> enabled?
>>
> 
> I have not tested this dtb (k3-am654-gp-evm.dtb). So just to be on the
> safe side I kept gp-evm.dtb as it was. Ideally gp-evm.dtb should have
> icssg2 support as well. But I haven't tested the combination of
> base-board + icssg dtbo + rockteck dtbo. That is why I kept gp-evm dtb
> as it was. Anyways, for ICSSG2's use case only k3-am654-base-board.dtb
> is used so I think it's ok to leave k3-am654-gp-evm.dtb to as it was.
> 
>> Andrew
>>

I tested AM654x-GP EVM with k3-am654-gp-evm.dtb with both the
combination below (having k3-am654-base-board-dtbs :=
k3-am654-common-board.dtb k3-am654-icssg2.dtbo), ICSSG worked fine in
both the scenarios and I didn't see any issue. I don't have a rocktech
panel with me so couldn't test that. But as far as ICSSG is concerned it
works fine with the both the combinations. Please let me know which one
should I use. Should I keep gp-evm as it is (use dtb without the icssg2
overlay) or should I add icssg2 overlay in gp-evm.dtb as well.


1. k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb
k3-am654-base-board-rocktech-rk101-panel.dtbo


2. k3-am654-gp-evm-dtbs := k3-am654-common-board.dtb
k3-am654-base-board-rocktech-rk101-panel.dtbo
Anwar, Md Danish Sept. 26, 2023, 4:10 a.m. UTC | #2
On 9/25/2023 7:15 PM, Andrew Davis wrote:
> On 9/25/23 3:21 AM, MD Danish Anwar wrote:
>> Hi Andrew,
>>
>> On 22/09/23 09:52, MD Danish Anwar wrote:
>>> On 21/09/23 22:57, Andrew Davis wrote:
>>>> On 9/21/23 1:09 AM, MD Danish Anwar wrote:
>>>>> ICSSG2 provides dual Gigabit Ethernet support.
>>>>>
>>>>> For support SR2.0 ICSSG Ethernet firmware:
>>>>> - provide different firmware blobs and use TX_PRU.
>>>>> - IEP0 is used as PTP Hardware Clock and can only be used for one
>>>>> port.
>>>>> - TX timestamp notification comes via INTC interrupt.
>>>>>
>>>>> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
>>>>> ---
>>>>>    arch/arm64/boot/dts/ti/Makefile               |   4 +-
>>>>>    ...se-board.dts => k3-am654-common-board.dts} |   0
>>>>>    arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso   | 145
>>>>> ++++++++++++++++++
>>>>>    3 files changed, 148 insertions(+), 1 deletion(-)
>>>>>    rename arch/arm64/boot/dts/ti/{k3-am654-base-board.dts =>
>>>>> k3-am654-common-board.dts} (100%)
>>>>>    create mode 100644 arch/arm64/boot/dts/ti/k3-am654-icssg2.dtso
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/ti/Makefile
>>>>> b/arch/arm64/boot/dts/ti/Makefile
>>>>> index e7b8e2e7f083..85c91f5e832e 100644
>>>>> --- a/arch/arm64/boot/dts/ti/Makefile
>>>>> +++ b/arch/arm64/boot/dts/ti/Makefile
>>>>> @@ -42,12 +42,14 @@ dtb-$(CONFIG_ARCH_K3) +=
>>>>> k3-am642-tqma64xxl-mbax4xxl-sdcard.dtb
>>>>>    dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl-wlan.dtb
>>>>>      # Boards with AM65x SoC
>>>>> -k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb
>>>>> k3-am654-base-board-rocktech-rk101-panel.dtbo
>>>>> +k3-am654-gp-evm-dtbs := k3-am654-common-board.dtb
>>>>> k3-am654-base-board-rocktech-rk101-panel.dtbo
>>>>
>>>> Should the k3-am654-gp-evm.dtb not also have this icssg2 support? Does
>>>> it work
>>>> to keep this line like before or is there some conflict having both
>>>> enabled?
>>>>
>>>
>>> I have not tested this dtb (k3-am654-gp-evm.dtb). So just to be on the
>>> safe side I kept gp-evm.dtb as it was. Ideally gp-evm.dtb should have
>>> icssg2 support as well. But I haven't tested the combination of
>>> base-board + icssg dtbo + rockteck dtbo. That is why I kept gp-evm dtb
>>> as it was. Anyways, for ICSSG2's use case only k3-am654-base-board.dtb
>>> is used so I think it's ok to leave k3-am654-gp-evm.dtb to as it was.
>>>
>>>> Andrew
>>>>
>>
>> I tested AM654x-GP EVM with k3-am654-gp-evm.dtb with both the
>> combination below (having k3-am654-base-board-dtbs :=
>> k3-am654-common-board.dtb k3-am654-icssg2.dtbo), ICSSG worked fine in
>> both the scenarios and I didn't see any issue. I don't have a rocktech
>> panel with me so couldn't test that. But as far as ICSSG is concerned it
>> works fine with the both the combinations. Please let me know which one
>> should I use. Should I keep gp-evm as it is (use dtb without the icssg2
>> overlay) or should I add icssg2 overlay in gp-evm.dtb as well.
>>
>>
>> 1. k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb
>> k3-am654-base-board-rocktech-rk101-panel.dtbo
>>
>>
>> 2. k3-am654-gp-evm-dtbs := k3-am654-common-board.dtb
>> k3-am654-base-board-rocktech-rk101-panel.dtbo
>>
> 
> As you said here before, most will expect the icssg2 to work
> on the EVM out of box, you should include it. If anyone wants
> something else they can apply the set of overlays that match
> on their own.
> 
> So, use base-board.
> 
> Andrew

Sure Andrew, I will make the change and send v3.