diff mbox series

[2/5] arm64: dts: broadcom: bcm4908: describe Ethernet controller

Message ID 20210215204105.27830-2-zajec5@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/5] arm64: dts: broadcom: bcm4908: describe USB PHY | expand

Commit Message

Rafał Miłecki Feb. 15, 2021, 8:41 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

BCM4908 SoCs have an integrated Ethernet controller.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../boot/dts/broadcom/bcm4908/bcm4908.dtsi    | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Florian Fainelli Feb. 16, 2021, 2:50 a.m. UTC | #1
On 2/15/2021 12:41 PM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> BCM4908 SoCs have an integrated Ethernet controller.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>  .../boot/dts/broadcom/bcm4908/bcm4908.dtsi    | 20 +++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
> index 358958105337..2d2c23292508 100644
> --- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
> +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
> @@ -112,6 +112,14 @@ soc {
>  		#size-cells = <1>;
>  		ranges = <0x00 0x00 0x80000000 0x281000>;
>  
> +		enet: ethernet@2000 {
> +			compatible = "brcm,bcm4908-enet";
> +			reg = <0x2000 0x1000>;
> +
> +			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "rx";
> +		};
> +
>  		usb_phy: usb-phy@c200 {
>  			compatible = "brcm,bcm4908-usb-phy";
>  			reg = <0xc200 0x100>;
> @@ -199,6 +207,18 @@ port@3 {
>  						phy-mode = "internal";
>  						phy-handle = <&phy11>;
>  					};
> +
> +					port@8 {
> +						reg = <8>;
> +						phy-mode = "internal";
> +						ethernet = <&enet>;
> +						brcm,use-bcm-hdr;

This looks redundant, because we have an "ethernet" phandle property
here this will become the CPU port for DSA and so we would enable
Broadcom tags on that port. Did you somehow need that for the switch
driver to work?
Rafał Miłecki Feb. 17, 2021, 9:31 p.m. UTC | #2
On 16.02.2021 03:50, Florian Fainelli wrote:
> On 2/15/2021 12:41 PM, Rafał Miłecki wrote:
>> From: Rafał Miłecki <rafal@milecki.pl>
>>
>> BCM4908 SoCs have an integrated Ethernet controller.
>>
>> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
>> ---
>>   .../boot/dts/broadcom/bcm4908/bcm4908.dtsi    | 20 +++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
>> index 358958105337..2d2c23292508 100644
>> --- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
>> +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
>> @@ -112,6 +112,14 @@ soc {
>>   		#size-cells = <1>;
>>   		ranges = <0x00 0x00 0x80000000 0x281000>;
>>   
>> +		enet: ethernet@2000 {
>> +			compatible = "brcm,bcm4908-enet";
>> +			reg = <0x2000 0x1000>;
>> +
>> +			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
>> +			interrupt-names = "rx";
>> +		};
>> +
>>   		usb_phy: usb-phy@c200 {
>>   			compatible = "brcm,bcm4908-usb-phy";
>>   			reg = <0xc200 0x100>;
>> @@ -199,6 +207,18 @@ port@3 {
>>   						phy-mode = "internal";
>>   						phy-handle = <&phy11>;
>>   					};
>> +
>> +					port@8 {
>> +						reg = <8>;
>> +						phy-mode = "internal";
>> +						ethernet = <&enet>;
>> +						brcm,use-bcm-hdr;
> 
> This looks redundant, because we have an "ethernet" phandle property
> here this will become the CPU port for DSA and so we would enable
> Broadcom tags on that port. Did you somehow need that for the switch
> driver to work?

I blindly added that property. I verified now that it's not needed.

It seems bcm_sf2_imp_setup() handles setup properly.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
index 358958105337..2d2c23292508 100644
--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
@@ -112,6 +112,14 @@  soc {
 		#size-cells = <1>;
 		ranges = <0x00 0x00 0x80000000 0x281000>;
 
+		enet: ethernet@2000 {
+			compatible = "brcm,bcm4908-enet";
+			reg = <0x2000 0x1000>;
+
+			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "rx";
+		};
+
 		usb_phy: usb-phy@c200 {
 			compatible = "brcm,bcm4908-usb-phy";
 			reg = <0xc200 0x100>;
@@ -199,6 +207,18 @@  port@3 {
 						phy-mode = "internal";
 						phy-handle = <&phy11>;
 					};
+
+					port@8 {
+						reg = <8>;
+						phy-mode = "internal";
+						ethernet = <&enet>;
+						brcm,use-bcm-hdr;
+
+						fixed-link {
+							speed = <1000>;
+							full-duplex;
+						};
+					};
 				};
 			};