From 0127c480bb709c38e6cd2b2c0deb6931606e709f Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Tue, 7 Feb 2017 17:15:36 +0100 Subject: brcm63xx: Neufbox 6: fix switch by probing through DT Probe the switch through DT instead of a platform device. This fixes probe, as GPIO offsets are now properly accounted for. Fixes the following issue: [ 0.802953] 8021q: 802.1Q VLAN Support v1.8 [ 0.810518] rtl8366_smi: gpio_request failed for 18, err=-517 Signed-off-by: Jonas Gorski --- .../linux/brcm63xx/patches-4.4/528-board_nb6.patch | 60 ++-------------------- 1 file changed, 3 insertions(+), 57 deletions(-) (limited to 'target/linux/brcm63xx/patches-4.4/528-board_nb6.patch') diff --git a/target/linux/brcm63xx/patches-4.4/528-board_nb6.patch b/target/linux/brcm63xx/patches-4.4/528-board_nb6.patch index 0f235093c3..5f1d47a150 100644 --- a/target/linux/brcm63xx/patches-4.4/528-board_nb6.patch +++ b/target/linux/brcm63xx/patches-4.4/528-board_nb6.patch @@ -1,61 +1,10 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -12,6 +12,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -27,6 +29,9 @@ - - #define HCS_OFFSET_128K 0x20000 - -+#define NB6_GPIO_RTL8367_SDA 18 -+#define NB6_GPIO_RTL8367_SCK 20 -+ - /* - * known 3368 boards - */ -@@ -1315,6 +1320,69 @@ static struct board_info __initdata boar +@@ -1315,6 +1315,34 @@ static struct board_info __initdata boar }; #endif /* CONFIG_BCM63XX_CPU_6358 */ +#ifdef CONFIG_BCM63XX_CPU_6362 -+static struct rtl8367_extif_config nb6_rtl8367_extif0_cfg = { -+ .mode = RTL8367_EXTIF_MODE_RGMII, -+ .txdelay = 1, -+ .rxdelay = 5, -+ .ability = { -+ .force_mode = 1, -+ .txpause = 1, -+ .rxpause = 1, -+ .link = 1, -+ .duplex = 1, -+ .speed = RTL8367_PORT_SPEED_1000, -+ }, -+}; -+ -+static struct rtl8367_platform_data nb6_rtl8367_data = { -+ .gpio_sda = NB6_GPIO_RTL8367_SDA, -+ .gpio_sck = NB6_GPIO_RTL8367_SCK, -+ .extif0_cfg = &nb6_rtl8367_extif0_cfg, -+}; -+ -+static struct platform_device nb6_rtl8367_device = { -+ .name = RTL8367_DRIVER_NAME, -+ .id = -1, -+ .dev = { -+ .platform_data = &nb6_rtl8367_data, -+ } -+}; -+ -+static struct platform_device * __initdata nb6_devices[] = { -+ &nb6_rtl8367_device, -+}; -+ +static struct board_info __initdata board_nb6 = { + .name = "NB6", + .expected_cpu_id = 0x6362, @@ -80,16 +29,13 @@ + }, + }, + }, -+ -+ .devs = nb6_devices, -+ .num_devs = ARRAY_SIZE(nb6_devices), +}; +#endif /* CONFIG_BCM63XX_CPU_6362 */ + /* * known 6368 boards */ -@@ -1466,6 +1534,10 @@ static const struct board_info __initcon +@@ -1466,6 +1494,10 @@ static const struct board_info __initcon &board_DVAG3810BN, #endif @@ -100,7 +46,7 @@ #ifdef CONFIG_BCM63XX_CPU_6368 &board_96368mvwg, &board_96368mvngr, -@@ -1534,6 +1606,9 @@ static struct of_device_id const bcm963x +@@ -1534,6 +1566,9 @@ static struct of_device_id const bcm963x { .compatible = "t-com,spw303v", .data = &board_spw303v, }, { .compatible = "telsey,cpva642", .data = &board_CPVA642, }, #endif -- cgit v1.2.3