Skip to content

Commit

Permalink
[EBC-RB01]Add rtl8368MBI lan switch driver
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Liang committed Jul 16, 2019
1 parent 26ebe7b commit 2dc4a32
Show file tree
Hide file tree
Showing 17 changed files with 10,741 additions and 3 deletions.
34 changes: 32 additions & 2 deletions arch/arm/boot/dts/imx6q-ebcrb01-a1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@
gpios = <&gpio4 7 GPIO_ACTIVE_LOW>;
};
};

rtl8367 {
compatible = "realtek,rtl8367b";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_rtl_sda &pinctrl_rtl_scl>;
gpio-sda = <&gpio4 5 GPIO_ACTIVE_HIGH>;
gpio-sck = <&gpio7 13 GPIO_ACTIVE_HIGH>;
realtek,extif0 = <1 0 1 1 1 1 1 1 2>;
};
};

&audio_sgtl5000 {
Expand Down Expand Up @@ -86,7 +95,10 @@
};

&i2c3 {
status = "disabled";
24c512@51 {
compatible = "fsl,24c512";
reg = <0x51>;
};
};

&iomuxc {
Expand All @@ -102,12 +114,26 @@
MX6QDL_PAD_SD2_CLK__GPIO1_IO10 0x80000000 /* SDIO WAKE */
MX6QDL_PAD_NANDF_D7__GPIO2_IO07 0x80000000 /* M.2 WLAN OFF */
MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x80000000 /* M.2 BT OFF */
MX6QDL_PAD_GPIO_19__GPIO4_IO05 0x80000000 /* UART 5 WAKE */
MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x130b0 /* AUDIO CLK */
MX6QDL_PAD_NANDF_CS0__GPIO6_IO11 0x80000000 /* WC_SPI */
>;
};
};

rtl_switch {
pinctrl_rtl_sda: rtl_sdagrp-1 {
fsl,pins = <
MX6QDL_PAD_GPIO_19__GPIO4_IO05 0x80000000 /* RTL8368_SDA */
>;
};
pinctrl_rtl_scl: rtl_sclgrp-1 {
fsl,pins = <
MX6QDL_PAD_GPIO_18__GPIO7_IO13 0x80000000 /* RTL8368_SCL */
>;
};

};

spi1 {
pinctrl_ecspi1_cs_0: ecspi1_cs_grp-0 {
fsl,pins = <
Expand Down Expand Up @@ -151,6 +177,10 @@
status = "disabled";
};

&fec {
phy-mode = "rgmii";
};

&ldb {
status = "disabled";
};
Expand Down
7 changes: 6 additions & 1 deletion arch/arm/configs/imx_v7_adv_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ CONFIG_SMC911X=y
CONFIG_SMSC911X=y
# CONFIG_NET_VENDOR_STMICRO is not set
CONFIG_REALTEK_PHY=y
CONFIG_RTL8366_SMI=y
CONFIG_RTL8366_SMI_DEBUG_FS=y
CONFIG_RTL8366S_PHY=y
CONFIG_RTL8366RB_PHY=y
CONFIG_RTL8367_PHY=y
CONFIG_RTL8367B_PHY=y
CONFIG_PPP=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_DEFLATE=y
Expand Down Expand Up @@ -279,7 +285,6 @@ CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT53XX=y
CONFIG_RT2800USB_RT55XX=y
CONFIG_RT2800USB_UNKNOWN=y
# CONFIG_ADVANTECH_RISC_RTL8821CE is not set
CONFIG_ADVANTECH_RISC_RTL8188EE=m
CONFIG_ADVANTECH_RISC_RTL8821AE=m
CONFIG_MWIFIEX_PCIE_8897=m
Expand Down
44 changes: 44 additions & 0 deletions drivers/net/phy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ menuconfig PHYLIB

if PHYLIB

config SWCONFIG
tristate "Switch configuration API"
---help---
Switch configuration API using netlink. This allows
you to configure the VLAN features of certain switches.

config SWCONFIG_LEDS
bool "Switch LED trigger support"
depends on (SWCONFIG && LEDS_TRIGGERS)


comment "MII PHY device drivers"

config AT803X_PHY
Expand Down Expand Up @@ -213,6 +224,39 @@ config MDIO_BCM_UNIMAC
controllers as well as some Broadcom Ethernet switches such as the
Starfighter 2 switches.

config RTL8366_SMI
tristate "Driver for the RTL8366 SMI interface"
depends on GPIOLIB
---help---
This module implements the SMI interface protocol which is used
by some RTL8366 ethernet switch devices via the generic GPIO API.

if RTL8366_SMI

config RTL8366_SMI_DEBUG_FS
bool "RTL8366 SMI interface debugfs support"
depends on DEBUG_FS
default n

config RTL8366S_PHY
tristate "Driver for the Realtek RTL8366S switch"
select SWCONFIG

config RTL8366RB_PHY
tristate "Driver for the Realtek RTL8366RB switch"
select SWCONFIG

config RTL8367_PHY
tristate "Driver for the Realtek RTL8367R/M switches"
select SWCONFIG

config RTL8367B_PHY
tristate "Driver fot the Realtek RTL8367R-VB switch"
select SWCONFIG

endif # RTL8366_SMI


endif # PHYLIB

config MICREL_KS8995MA
Expand Down
8 changes: 8 additions & 0 deletions drivers/net/phy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ obj-$(CONFIG_MDIO_SUN4I) += mdio-sun4i.o
obj-$(CONFIG_MDIO_MOXART) += mdio-moxart.o
obj-$(CONFIG_AMD_XGBE_PHY) += amd-xgbe-phy.o
obj-$(CONFIG_MDIO_BCM_UNIMAC) += mdio-bcm-unimac.o
obj-$(CONFIG_RTL8306_PHY) += rtl8306.o
obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi.o
obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o
obj-$(CONFIG_RTL8366RB_PHY) += rtl8366rb.o
obj-$(CONFIG_RTL8367_PHY) += rtl8367.o
obj-$(CONFIG_RTL8367B_PHY) += rtl8367b.o
obj-$(CONFIG_SWCONFIG) += swconfig.o

Loading

0 comments on commit 2dc4a32

Please sign in to comment.