diff mbox series

[1/2] arm64: dts: ti: k3-am65-main: Add ICSSG MDIO nodes

Message ID 20210514224759.9987-2-s-anna@ti.com (mailing list archive)
State New, archived
Headers show
Series Add ICSSG MDIO nodes on AM65x & J721E SoCs | expand

Commit Message

Suman Anna May 14, 2021, 10:47 p.m. UTC
From: Roger Quadros <rogerq@ti.com>

The ICSSGs on K3 AM65x SoCs contain an MDIO controller that can
be used to control external PHYs associated with the Industrial
Ethernet peripherals within each ICSSG instance. The MDIO module
used within the ICSSG is similar to the MDIO Controller used
in TI Davinci SoCs. A bus frequency of 1 MHz is chosen for the
MDIO operations.

The nodes are added and enabled in the common k3-am65-main.dtsi
file by default, and disabled in the existing AM65 board dts
files. These nodes need pinctrl lines, and so should be enabled
only on boards where they are actually wired and pinned out for
ICSSG Ethernet. Any new board dts file should disable these if
they are not sure.

Signed-off-by: Roger Quadros <rogerq@ti.com>
[s-anna@ti.com: move the disabled status to board dts files]
Signed-off-by: Suman Anna <s-anna@ti.com>
---
 .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 12 ++++++++
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi      | 30 +++++++++++++++++++
 .../arm64/boot/dts/ti/k3-am654-base-board.dts | 12 ++++++++
 3 files changed, 54 insertions(+)

Comments

Grygorii Strashko May 27, 2021, 3:12 p.m. UTC | #1
On 15/05/2021 01:47, Suman Anna wrote:
> From: Roger Quadros <rogerq@ti.com>
> 
> The ICSSGs on K3 AM65x SoCs contain an MDIO controller that can
> be used to control external PHYs associated with the Industrial
> Ethernet peripherals within each ICSSG instance. The MDIO module
> used within the ICSSG is similar to the MDIO Controller used
> in TI Davinci SoCs. A bus frequency of 1 MHz is chosen for the
> MDIO operations.
> 
> The nodes are added and enabled in the common k3-am65-main.dtsi
> file by default, and disabled in the existing AM65 board dts
> files. These nodes need pinctrl lines, and so should be enabled
> only on boards where they are actually wired and pinned out for
> ICSSG Ethernet. Any new board dts file should disable these if
> they are not sure.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> [s-anna@ti.com: move the disabled status to board dts files]
> Signed-off-by: Suman Anna <s-anna@ti.com>
> ---
>   .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 12 ++++++++
>   arch/arm64/boot/dts/ti/k3-am65-main.dtsi      | 30 +++++++++++++++++++
>   .../arm64/boot/dts/ti/k3-am654-base-board.dts | 12 ++++++++
>   3 files changed, 54 insertions(+)
> 

Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Jan Kiszka May 28, 2021, 5:09 a.m. UTC | #2
On 15.05.21 00:47, Suman Anna wrote:
> From: Roger Quadros <rogerq@ti.com>
> 
> The ICSSGs on K3 AM65x SoCs contain an MDIO controller that can
> be used to control external PHYs associated with the Industrial
> Ethernet peripherals within each ICSSG instance. The MDIO module
> used within the ICSSG is similar to the MDIO Controller used
> in TI Davinci SoCs. A bus frequency of 1 MHz is chosen for the
> MDIO operations.
> 
> The nodes are added and enabled in the common k3-am65-main.dtsi
> file by default, and disabled in the existing AM65 board dts
> files. These nodes need pinctrl lines, and so should be enabled
> only on boards where they are actually wired and pinned out for
> ICSSG Ethernet. Any new board dts file should disable these if
> they are not sure.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> [s-anna@ti.com: move the disabled status to board dts files]
> Signed-off-by: Suman Anna <s-anna@ti.com>
> ---
>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 12 ++++++++
>  arch/arm64/boot/dts/ti/k3-am65-main.dtsi      | 30 +++++++++++++++++++
>  .../arm64/boot/dts/ti/k3-am654-base-board.dts | 12 ++++++++
>  3 files changed, 54 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> index de763ca9251c..63140eaba524 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
> @@ -653,3 +653,15 @@ &pcie1_rc {
>  &pcie1_ep {
>  	status = "disabled";
>  };
> +
> +&icssg0_mdio {
> +	status = "disabled";
> +};
> +
> +&icssg1_mdio {
> +	status = "disabled";
> +};
> +
> +&icssg2_mdio {
> +	status = "disabled";
> +};

We will need this here for PRU networking. What would be the impact of
leaving it enabled already at this stage?

Jan

> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> index cb340d1b401f..25ec7aba841a 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> @@ -1051,6 +1051,16 @@ tx_pru0_1: txpru@c000 {
>  			reg-names = "iram", "control", "debug";
>  			firmware-name = "am65x-txpru0_1-fw";
>  		};
> +
> +		icssg0_mdio: mdio@32400 {
> +			compatible = "ti,davinci_mdio";
> +			reg = <0x32400 0x100>;
> +			clocks = <&k3_clks 62 3>;
> +			clock-names = "fck";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			bus_freq = <1000000>;
> +		};
>  	};
>  
>  	icssg1: icssg@b100000 {
> @@ -1182,6 +1192,16 @@ tx_pru1_1: txpru@c000 {
>  			reg-names = "iram", "control", "debug";
>  			firmware-name = "am65x-txpru1_1-fw";
>  		};
> +
> +		icssg1_mdio: mdio@32400 {
> +			compatible = "ti,davinci_mdio";
> +			reg = <0x32400 0x100>;
> +			clocks = <&k3_clks 63 3>;
> +			clock-names = "fck";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			bus_freq = <1000000>;
> +		};
>  	};
>  
>  	icssg2: icssg@b200000 {
> @@ -1313,5 +1333,15 @@ tx_pru2_1: txpru@c000 {
>  			reg-names = "iram", "control", "debug";
>  			firmware-name = "am65x-txpru2_1-fw";
>  		};
> +
> +		icssg2_mdio: mdio@32400 {
> +			compatible = "ti,davinci_mdio";
> +			reg = <0x32400 0x100>;
> +			clocks = <&k3_clks 64 3>;
> +			clock-names = "fck";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			bus_freq = <1000000>;
> +		};
>  	};
>  };
> diff --git a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
> index 9e87fb313a54..be905a006a97 100644
> --- a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
> @@ -537,3 +537,15 @@ &mcasp2 {
>  &dss {
>  	status = "disabled";
>  };
> +
> +&icssg0_mdio {
> +	status = "disabled";
> +};
> +
> +&icssg1_mdio {
> +	status = "disabled";
> +};
> +
> +&icssg2_mdio {
> +	status = "disabled";
> +};
>
Jan Kiszka May 28, 2021, 5:22 a.m. UTC | #3
On 28.05.21 07:09, Jan Kiszka wrote:
> On 15.05.21 00:47, Suman Anna wrote:
>> From: Roger Quadros <rogerq@ti.com>
>>
>> The ICSSGs on K3 AM65x SoCs contain an MDIO controller that can
>> be used to control external PHYs associated with the Industrial
>> Ethernet peripherals within each ICSSG instance. The MDIO module
>> used within the ICSSG is similar to the MDIO Controller used
>> in TI Davinci SoCs. A bus frequency of 1 MHz is chosen for the
>> MDIO operations.
>>
>> The nodes are added and enabled in the common k3-am65-main.dtsi
>> file by default, and disabled in the existing AM65 board dts
>> files. These nodes need pinctrl lines, and so should be enabled
>> only on boards where they are actually wired and pinned out for
>> ICSSG Ethernet. Any new board dts file should disable these if
>> they are not sure.
>>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> [s-anna@ti.com: move the disabled status to board dts files]
>> Signed-off-by: Suman Anna <s-anna@ti.com>
>> ---
>>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 12 ++++++++
>>  arch/arm64/boot/dts/ti/k3-am65-main.dtsi      | 30 +++++++++++++++++++
>>  .../arm64/boot/dts/ti/k3-am654-base-board.dts | 12 ++++++++
>>  3 files changed, 54 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>> index de763ca9251c..63140eaba524 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>> @@ -653,3 +653,15 @@ &pcie1_rc {
>>  &pcie1_ep {
>>  	status = "disabled";
>>  };
>> +
>> +&icssg0_mdio {
>> +	status = "disabled";
>> +};
>> +
>> +&icssg1_mdio {
>> +	status = "disabled";
>> +};
>> +
>> +&icssg2_mdio {
>> +	status = "disabled";
>> +};
> 
> We will need this here for PRU networking. What would be the impact of
> leaving it enabled already at this stage?
> 

Ah, now reading our backlog completely - there will be more coming in to
this file than not disabling icssg mdio (and that only for mdio0). So:

Acked-by: Jan Kiszka <jan.kiszka@siemens.com>

Jan

PS: How far are we away from icssg-prueth?
Suman Anna May 28, 2021, 12:20 p.m. UTC | #4
On 5/28/21 12:22 AM, Jan Kiszka wrote:
> On 28.05.21 07:09, Jan Kiszka wrote:
>> On 15.05.21 00:47, Suman Anna wrote:
>>> From: Roger Quadros <rogerq@ti.com>
>>>
>>> The ICSSGs on K3 AM65x SoCs contain an MDIO controller that can
>>> be used to control external PHYs associated with the Industrial
>>> Ethernet peripherals within each ICSSG instance. The MDIO module
>>> used within the ICSSG is similar to the MDIO Controller used
>>> in TI Davinci SoCs. A bus frequency of 1 MHz is chosen for the
>>> MDIO operations.
>>>
>>> The nodes are added and enabled in the common k3-am65-main.dtsi
>>> file by default, and disabled in the existing AM65 board dts
>>> files. These nodes need pinctrl lines, and so should be enabled
>>> only on boards where they are actually wired and pinned out for
>>> ICSSG Ethernet. Any new board dts file should disable these if
>>> they are not sure.
>>>
>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>> [s-anna@ti.com: move the disabled status to board dts files]
>>> Signed-off-by: Suman Anna <s-anna@ti.com>
>>> ---
>>>  .../boot/dts/ti/k3-am65-iot2050-common.dtsi   | 12 ++++++++
>>>  arch/arm64/boot/dts/ti/k3-am65-main.dtsi      | 30 +++++++++++++++++++
>>>  .../arm64/boot/dts/ti/k3-am654-base-board.dts | 12 ++++++++
>>>  3 files changed, 54 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>>> index de763ca9251c..63140eaba524 100644
>>> --- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>>> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
>>> @@ -653,3 +653,15 @@ &pcie1_rc {
>>>  &pcie1_ep {
>>>  	status = "disabled";
>>>  };
>>> +
>>> +&icssg0_mdio {
>>> +	status = "disabled";
>>> +};
>>> +
>>> +&icssg1_mdio {
>>> +	status = "disabled";
>>> +};
>>> +
>>> +&icssg2_mdio {
>>> +	status = "disabled";
>>> +};
>>
>> We will need this here for PRU networking. What would be the impact of
>> leaving it enabled already at this stage?
>>
> 
> Ah, now reading our backlog completely - there will be more coming in to
> this file than not disabling icssg mdio (and that only for mdio0). So:

Yeah, these will be enabled when the corresponding pinctrl pins are added, so
will come alongside the icssg ethernet nodes in the future.

> 
> Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Jan
> 
> PS: How far are we away from icssg-prueth?

The last missing pieces from PRUSS foundation point of view are the PRUSS
consumer API series, which need next versions to be posted upstream. I would say
still couple of merge windows.

regards
Suman
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
index de763ca9251c..63140eaba524 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
@@ -653,3 +653,15 @@  &pcie1_rc {
 &pcie1_ep {
 	status = "disabled";
 };
+
+&icssg0_mdio {
+	status = "disabled";
+};
+
+&icssg1_mdio {
+	status = "disabled";
+};
+
+&icssg2_mdio {
+	status = "disabled";
+};
diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index cb340d1b401f..25ec7aba841a 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -1051,6 +1051,16 @@  tx_pru0_1: txpru@c000 {
 			reg-names = "iram", "control", "debug";
 			firmware-name = "am65x-txpru0_1-fw";
 		};
+
+		icssg0_mdio: mdio@32400 {
+			compatible = "ti,davinci_mdio";
+			reg = <0x32400 0x100>;
+			clocks = <&k3_clks 62 3>;
+			clock-names = "fck";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			bus_freq = <1000000>;
+		};
 	};
 
 	icssg1: icssg@b100000 {
@@ -1182,6 +1192,16 @@  tx_pru1_1: txpru@c000 {
 			reg-names = "iram", "control", "debug";
 			firmware-name = "am65x-txpru1_1-fw";
 		};
+
+		icssg1_mdio: mdio@32400 {
+			compatible = "ti,davinci_mdio";
+			reg = <0x32400 0x100>;
+			clocks = <&k3_clks 63 3>;
+			clock-names = "fck";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			bus_freq = <1000000>;
+		};
 	};
 
 	icssg2: icssg@b200000 {
@@ -1313,5 +1333,15 @@  tx_pru2_1: txpru@c000 {
 			reg-names = "iram", "control", "debug";
 			firmware-name = "am65x-txpru2_1-fw";
 		};
+
+		icssg2_mdio: mdio@32400 {
+			compatible = "ti,davinci_mdio";
+			reg = <0x32400 0x100>;
+			clocks = <&k3_clks 64 3>;
+			clock-names = "fck";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			bus_freq = <1000000>;
+		};
 	};
 };
diff --git a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
index 9e87fb313a54..be905a006a97 100644
--- a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
@@ -537,3 +537,15 @@  &mcasp2 {
 &dss {
 	status = "disabled";
 };
+
+&icssg0_mdio {
+	status = "disabled";
+};
+
+&icssg1_mdio {
+	status = "disabled";
+};
+
+&icssg2_mdio {
+	status = "disabled";
+};