-
Notifications
You must be signed in to change notification settings - Fork 1
rtl8366_smi: Exclude cpu port from pvid initialization. #1
base: staging
Are you sure you want to change the base?
Conversation
Fix indentation and remove superfluous linebreaks. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Extend rtl8366_smi with chip_ver field for storing chip ID. Useful for drivers supporting multiple chip versions. Replace method calls with macro. Receive chip number and mode only if detection error occured. Signed-off-by: Vitaly Chekryzhev <[email protected]>
On chip present 2 ports, set CPU port id depending on which external port is configured. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as 13hakta#1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,13hakta#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Previously rlvid was wrongly converted and for different chip (0x1000, 0x1010) it was equal 1 what caused loading improper values to RTL8367RB switch. Load initvals depending on raw chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
On RTL8367R-VB/RB chips present 2 external ports of maximum 3. Port lede-project#7 works in RGMII mode only and present only on RTL8367RB. Ports are numbered sequentially and so port lede-project#5 must be avoided as only ports 0-4,6,7 are present on board. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Signed-off-by: Vitaly Chekryzhev <[email protected]>
Macro selects by mask all hardware ports for batch operations. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Add methods managing port abilities such as enabled, speed, green mode. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Add register and masks for external port lede-project#2 Add RGMII mode support for external port lede-project#2 Rewrite method according API, fix bit with bypass line rate. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Force enable PHY and external ports at switch setup. Remove unused definitions and move register init to initval array. Updated only short array as due to detection bug long array never used. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Replace long init array for RTL8367R-VB to short array for RTL8367RB. Previously init always loaded short array for two chip models but still there is difference among them. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Update names according to chip names. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Previously method marked port as not permitted, perform actual port on/off. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Add register and mask definitions for LED operations Add LED control methods: group enable, switch serial/parallel mode, set group mode, get/set blink rate. Add swconfig methods: get/set group mode, get/set blink rate. Add LED initialisation Signed-off-by: Vitaly Chekryzhev <[email protected]>
Add swconfig methods to allow automatically manage port power with Realtek’s Green Ethernet power saving modes, and Energy Efficient Ethernet (EEE) mode (defined in IEEE 802.3az), to minimize system power consumption. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Signed-off-by: Vitaly Chekryzhev <[email protected]>
Fix indentation, add missing linebreaks and remove superfluous linebreaks. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Signed-off-by: Vitaly Chekryzhev <[email protected]>
…acro Convert method to macro slightly improves performance. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Switches support two management modes: GPIO driven/MDIO, while MDIO support was missing. Workaround methods to add direct MDIO support. Extend 'rtl8366_smi' struct with mdio_enabled flag. Flag is set if 'mdio' property was found in devicetree, otherwise switch is controlled via GPIO. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port 13hakta#1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
According to external interface mapping extif1 on RTL8367RB becomes extif0. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Signed-off-by: Vitaly Chekryzhev <[email protected]>
It causes errors when probing the device.
Fix indentation and remove superfluous linebreaks. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Extend rtl8366_smi with chip_ver field for storing chip ID. Useful for drivers supporting multiple chip versions. Replace method calls with macro. Receive chip number and mode only if detection error occured. Signed-off-by: Vitaly Chekryzhev <[email protected]>
On chip present 2 ports, set CPU port id depending on which external port is configured. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as 13hakta#1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,13hakta#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Previously rlvid was wrongly converted and for different chip (0x1000, 0x1010) it was equal 1 what caused loading improper values to RTL8367RB switch. Load initvals depending on raw chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Switches support two management modes: GPIO driven/MDIO, while MDIO support was missing. Workaround methods to add direct MDIO support. Extend 'rtl8366_smi' struct with mdio_enabled flag. Flag is set if 'mdio' property was found in devicetree, otherwise switch is controlled via GPIO. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port 13hakta#1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
According to external interface mapping extif1 on RTL8367RB becomes extif0. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Signed-off-by: Vitaly Chekryzhev <[email protected]>
Without the cpu check patch and adding a printk at the position: DTS setting: lantiq,exif1: DTS setting: lantiq,exif2: Do I missing something? |
You've found an issue just at the point where I stopped. The point is that driver covers few devices which have different port combinations. R-VB has ext0,ext1 (port 5,6 or ext 0,1), RB has ext1,ext2 (port 7,8 or ext 1,2). That means that on PVID init must be avoided NON-present port. That's where you catch err=1. |
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Remove unneeded cpu port property, update external interface init according to mapped ports for RTL8267RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Update external interface init according to mapped ports for RTL8367RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
Update external interface init according to mapped ports for RTL8367RB: ext port #1 = extif0 ext port lede-project#2 = extif1 Signed-off-by: Vitaly Chekryzhev <[email protected]>
Driver supports 2 chip versions: RTL8367RB, RTL8367R-VB. Each of them has 2 external ports. RTL8367RB has ports indexed as #1,lede-project#2 (PHY lede-project#6, lede-project#7). RTL8367R-VB has ports indexed as #0,#1 (PHY lede-project#5,lede-project#6). Map ports so that extif0 complies to external port 0 or 1 depending on chip ID. Signed-off-by: Vitaly Chekryzhev <[email protected]>
It causes errors when probing the device, such as:
[ 2.568059] rtl8367b rtl8367b: using bus lantiq,xrx200-mdio
[ 2.572494] rtl8367b rtl8367b: RTL8367RB chip found
[ 4.041784] rtl8367b rtl8367b: VLAN initialization failed, err=1
[ 4.047809] rtl8367b: probe of rtl8367b failed with error 1
Maybe I missed that one on my last test.