Help with Inteno XG6846

Hi to all

i have a few XG6846 device
they are working well, and the 6th port (SFP) is helping me a lot
always needed +1 port :slight_smile:

my problem is that factory firmware is very limited, so i like to put OpenWRT on it to gain some SNMP information, etc
Nothing special, but i like OpenWRT look&feel
I itend to use these devices as smart L2 switch

i tried to compile own FW for 96328avng, older v4.x and latest v5.x kernel
Initram image boot from network, everything looks fine, execpt, the main thing :frowning:
there is no network

swconfig shows the chip, but every port is down.
Does someone want to help me to port OpenWRT on this device?

here is the original boot log

HELO
CPUI
L1CI
DRAM
----
PHYS
ZQDN
300H
PHYE
DINT
LSYN
USYN
MSYN
LMBE
RACE
PASS
----
ZBSS
CODE
DATA
L12F
MAIN


CFE version 1.0.38-114.101 for BCM96328 (32bit,SP,BE)
Build Date: Tue Jul  9 10:13:28 CST 2013 (mike_chen@cs1.xavi.com.tw)
Copyright (C) 2000-2011 Broadcom Corporation.

HS Serial flash device: name S25FL128, id 0x0118 size 16384KB
Total Flash size: 16384K with 256 sectors
Flash not used for Auxillary File System
Chip ID: BCM6328B0, MIPS: 320MHz, DDR: 320MHz, Bus: 160MHz
Main Thread: TP0
Memory Test Passed
Total Memory: 67108864 bytes (64MB)
Boot Address: 0xb8000000

Board IP address                  : 192.168.168.1:ffffff00
Host IP address                   : 192.168.168.66
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 2
Boot image (0=latest, 1=previous) : 0
Board Id (0-10)                   : 96328avng
Number of MAC Addresses (1-32)    : 11
Base MAC Address                  : 00:22:07:c4:4b:a5
PSI Size (1-64) KBytes            : 24
Enable Backup PSI [0|1]           : 0
System Log Size (0-256) KBytes    : 0
Auxillary File System Size Percent: 0
Main Thread Number [0|1]          : 0

*** Press any key to stop auto run (2 seconds) ***
Auto run second count down: 0
Booting from latest image (0xb8800000) ...
Code Address: 0x80010000, Entry Address: 0x80286720
Decompression OK!
Entry at 0x80286720
Closing network.
Disabling Switch ports.
Flushing Receive Buffers...
0 buffers found.
Closing DMA Channels.
Starting program at 0x80286720
Linux version 2.6.30 (mike_chen@cs1) (gcc version 4.4.2 (Buildroot 2010.02-git) ) #28 Thu Apr 30 17:43:16 CST 2015
HS Serial flash device: name S25FL128, id 0x0118 size 16384KB
96328avng prom init
CPU revision is: 0002a075 (Broadcom4350)
DSL SDRAM reserved: 0x100000
Determined physical RAM map:
 memory: 03f00000 @ 00000000 (usable)
Zone PFN ranges:
  DMA      0x00000000 -> 0x00001000
  Normal   0x00001000 -> 0x00003f00
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00003f00
On node 0 totalpages: 16128
free_area_init_node: node 0, pgdat 80334130, node_mem_map 81000000
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4064 pages, LIFO batch:0
  Normal zone: 94 pages used for memmap
  Normal zone: 11938 pages, LIFO batch:1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16002
Kernel command line: root=31:0 ro noinitrd console=ttyS0,115200
wait instruction: enabled
Primary instruction cache 32kB, VIPT, 4-way, linesize 16 bytes.
Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
NR_IRQS:128
PID hash table entries: 256 (order: 8, 1024 bytes)
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 60304k/64512k available (2545k kernel code, 4188k reserved, 676k data, 120k init, 0k highmem)
Calibrating delay loop... 319.48 BogoMIPS (lpj=159744)
Mount-cache hash table entries: 512
--Kernel Config--
  SMP=0
  PREEMPT=0
  DEBUG_SPINLOCK=0
  DEBUG_MUTEXES=0
Broadcom Logger v0.1 Apr 14 2015 17:25:33
net_namespace: 812 bytes
NET: Registered protocol family 16
Total Flash size: 16384K with 256 sectors
Flash not used for Auxillary File System
registering PCI controller with io_map_base unset
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pci 0000:00:09.0: reg 10 32bit mmio: [0x10002600-0x100026ff]
pci 0000:00:0a.0: reg 10 32bit mmio: [0x10002500-0x100025ff]
pci 0000:01:00.0: PME# supported from D0 D3hot
pci 0000:01:00.0: PME# disabled
pci 0000:01:00.0: PCI bridge, secondary bus 0000:02
pci 0000:01:00.0:   IO window: disabled
pci 0000:01:00.0:   MEM window: disabled
pci 0000:01:00.0:   PREFETCH window: disabled
PCI: Setting latency timer of device 0000:01:00.0 to 64
BLOG v3.0 Initialized
BLOG Rule v1.0 Initialized
Broadcom IQoS v0.1 Apr 14 2015 17:26:18 initialized
Broadcom GBPM v0.1 Apr 14 2015 17:26:19 initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
squashfs: version 4.0 with LZMA457 ported by BRCM
fuse init (API version 7.11)
msgmni has been set to 117
io scheduler noop registered (default)
pcieport-driver 0000:01:00.0: device [14e4:6328] has invalid IRQ; check vendor BIOS
PCI: Setting latency timer of device 0000:01:00.0 to 64
Driver 'sd' needs updating - please use bus_type methods
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
NET: Registered protocol family 24
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
bcm963xx_mtd driver v2.0
File system address: 0xb8800100
Registered device mtd[BCM63XX RootFS] dev[0] Flash[0xb8800100,2056192]
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
PCI: Enabling device 0000:00:0a.0 (0000 -> 0002)
PCI: Setting latency timer of device 0000:00:0a.0 to 64
ehci_hcd 0000:00:0a.0: EHCI Host Controller
ehci_hcd 0000:00:0a.0: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:0a.0: Enabling legacy PCI PM
ehci_hcd 0000:00:0a.0: irq 50, io mem 0x10002500
ehci_hcd 0000:00:0a.0: USB f.f started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
PCI: Enabling device 0000:00:09.0 (0000 -> 0002)
PCI: Setting latency timer of device 0000:00:09.0 to 64
ohci_hcd 0000:00:09.0: OHCI Host Controller
ohci_hcd 0000:00:09.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:09.0: irq 49, io mem 0x10002600
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
brcmboard: brcm_board_init entry
PCIe: No device found - Powering down
Serial: BCM63XX driver $Revision: 3.00 $
Magic SysRq enabled (type ^ h for list of supported commands)
ttyS0 at MMIO 0xb0000100 (irq = 36) is a BCM63XX
ttyS1 at MMIO 0xb0000120 (irq = 47) is a BCM63XX
Total # RxBds=1920
bcmPktDmaBds_init: Broadcom Packet DMA BDs initialized

GACT probability NOT on
Mirror/redirect action on
u32 classifier
    input device check on
    Actions configured
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:0.
Freeing unused kernel memory: 120k freed
init started: BusyBox v1.17.2 (2015-04-14 17:27:52 CST)
starting pid 187, tty '': '/etc/init.d/rcS'
/etc/init.d/rcS: line 13: syntax error: unexpected ")" (expecting ";;")
starting pid 190, tty '': '-/bin/sh'


BusyBox v1.17.2 (2015-04-14 17:27:52 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Loading drivers and kernel modules...
chipinfo: module license 'proprietary' taints kernel.
Disabling lock debugging due to kernel taint
brcmchipinfo: brcm_chipinfo_init entry
Broadcom Ingress QoS Module  Char Driver v0.1 Apr 14 2015 17:25:56 Registered<243>

Broadcom Ingress QoS ver 0.1 initialized
BPM: tot_mem_size=67108864B (64MB), buf_mem_size=10066329B (9MB), num of buffers=4802, buf size=2096
Broadcom BPM Module Char Driver v0.1 Apr 14 2015 17:25:55 Registered<244>
[NTC bpm] bpm_set_status: BPM status : enabled

NBUFF v1.0 Initialized
Initialized fcache state
Broadcom Packet Flow Cache  Char Driver v2.2 Apr 14 2015 17:25:56 Registered<242>
Created Proc FS /procfs/fcache
Broadcom Packet Flow Cache registered with netdev chain
Broadcom Packet Flow Cache learning via BLOG enabled.
Constructed Broadcom Packet Flow Cache v2.2 Apr 14 2015 17:25:56
Broadcom BCM6328B0 Ethernet Network Device v0.1 Apr 14 2015 17:25:58
ETH Init: Ch:0 - 200 tx BDs at 0xa3972000
ETH Init: Ch:0 - 1920 rx BDs at 0xa38a8000
dgasp: kerSysRegisterDyingGaspHandler: bcmsw registered
eth0: MAC Address: 00:22:07:C4:4B:A5
eth0 Link UP 1000 mbps full duplex
message received before monitor task is initialized kerSysSendtoMonitorTask
Init switch ports for igmpsnooping
Init switch LAN1~4 ports for EEE, enable = 0
Marvell switch control module loaded successfully.
xavi_igmpsnooping module loaded successfully.
XAVi fiber control module loaded successfully.
XAVi LED mode module loaded successfully.
XAVi port_limit  Apr 14 2015 17:26:04 debug (0)

===== Release Version XG6846_4.12ITT01.69 (build timestamp 150430_1743) =====

[devCtl_catvData][544] catvData: enable 0
Skipped rcl
SFP fiber start
SFP Copper is detected.
disable port 0 egress rate limiting
disable port 1 egress rate limiting
disable port 2 egress rate limiting
disable port 3 egress rate limiting
sendto: Network is unreachable
device eth0 entered promiscuous mode
br0: port 1(eth0) entering forwarding state
monitor task is initialized pid= 281
xavi_switch_daemon started.
xavi_wan started.
Allocating 1 taps...
1 of 1
.:: Gone into daemonland ::.
Switch VTB Flush!
Starting Master Thread... OK
Starting Interface Threads...
1 of 1Add an STU entry for init VTB !
device tap0 entered promiscuous mode
br0: port 2(tap0) entering forwarding state
br0: port 1(eth0) entering disabled state
br0: port 1(eth0) entering forwarding state
CATV: No signal/CATV not connected
GUI & DHCP option 66(url) or 67(file) Not Found.

here it is a OpenWRT dmesg


[    0.000000] Linux version 5.4.48 (user@serverb) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r13674-cbb66f9edb)) #0 Wed Jul 1 20:19:50 2020
[    0.000000] Detected Broadcom 0x6328 CPU revision b0
[    0.000000] CPU frequency is 320 MHz
[    0.000000] 64MB of RAM installed
[    0.000000] board_bcm963xx: Boot address 0xb8000000
[    0.000000] board_bcm963xx: CFE version: 1.0.38-114.101
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0002a075 (Broadcom BMIPS4350)
[    0.000000] board: board name: 96328avng
[    0.000000] MIPS: machine is Broadcom BCM96328avng reference board
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 16 bytes.
[    0.000000] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 144 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 49932K/65536K available (4693K kernel code, 215K rwdata, 1076K rodata, 8728K init, 199K bss, 15604K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x328/0x530 with crng_init=0
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11945377789 ns
[    0.000018] sched_clock: 32 bits at 160MHz, resolution 6ns, wraps every 13421772796ns
[    0.008130] Calibrating delay loop... 319.74 BogoMIPS (lpj=639488)
[    0.050521] pid_max: default: 32768 minimum: 301
[    0.055653] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.063231] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.080359] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.090439] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.097661] pinctrl core: initialized pinctrl subsystem
[    0.104349] NET: Registered protocol family 16
[    0.354099] registering PCI controller with io_map_base unset
[    0.410618] PCI host bridge to bus 0000:00
[    0.414907] pci_bus 0000:00: root bus resource [mem 0x10f00000-0x10ffffff]
[    0.421978] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.428959] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.435942] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.444155] pci 0000:00:00.0: [14e4:6328] type 01 class 0x060400
[    0.450484] pci 0000:00:00.0: PME# supported from D0 D3hot
[    0.457555] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.467012] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.473851] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.480667] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.495161] clocksource: Switched to clocksource MIPS
[    0.503554] NET: Registered protocol family 2
[    0.509828] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.518572] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.526527] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.533850] TCP: Hash tables configured (established 1024 bind 1024)
[    0.540981] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.547830] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.555681] NET: Registered protocol family 1
[    0.560313] PCI: CLS 0 bytes, default 16
[    0.983896] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    1.008176] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.014218] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.068329] bcm6328-pinctrl 10000080.pin-controller: registered at mmio (ptrval)
[    1.078394] 10000100.serial: ttyS0 at MMIO 0x10000100 (irq = 36, base_baud = 1562500) is a bcm63xx_uart
[    1.088161] printk: console [ttyS0] enabled
[    1.096754] printk: bootconsole [early0] disabled
[    1.127510] random: fast init done
[    1.131649] spi-nor spi1.0: s25fl128s1 (16384 Kbytes)
[    1.167606] bcm63xxpart: Partition 0 is CFE offset 0 and length 10000
[    1.174247] bcm63xxpart: Partition 1 is nvram offset ff0000 and length 10000
[    1.181485] bcm63xxpart: Partition 2 is linux offset 10000 and length fe0000
[    1.188819] 3 bcm63xxpart partitions found on MTD device spi1.0
[    1.194928] Creating 3 MTD partitions on "spi1.0":
[    1.199875] 0x000000000000-0x000000010000 : "CFE"
[    1.206858] 0x000000ff0000-0x000001000000 : "nvram"
[    1.213936] 0x000000010000-0x000000ff0000 : "linux"
[    1.229206] parser_imagetag: rootfs: CFE image tag found at 0x0 with version 6, board type 96328avng
[    1.238676] parser_imagetag: Partition 0 is rootfs offset 100 and length 1f6000
[    1.246193] parser_imagetag: Partition 1 is kernel offset 1f6100 and length 11cd5b
[    1.253976] parser_imagetag: Spare partition is offset 120000 and length ec0000
[    1.261579] 2 bcm963xx-imagetag partitions found on MTD device linux
[    1.268140] Creating 2 MTD partitions on "linux":
[    1.272979] 0x000000000100-0x0000001f6100 : "rootfs"
[    1.280205] mtd: device 3 (rootfs) set to be root filesystem
[    1.289095] mtdsplit: no squashfs found in "rootfs"
[    1.294214] 0x0000001f6100-0x000000312e5b : "kernel"
[    1.303770] libphy: Fixed MDIO Bus: probed
[    1.308606] bcm63xx_enetsw bcm63xx_enetsw.0: IRQ index 1 not found
[    1.356325] b53_common: found switch: BCM63xx, rev 0
[    1.362116] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec
[    1.371381] leds-gpio leds-gpio.0: Skipping unavailable LED gpio 0 ((null))
[    1.378579] leds-gpio leds-gpio.0: Skipping unavailable LED gpio 0 ((null))
[    1.385744] leds-gpio leds-gpio.0: Skipping unavailable LED gpio 0 ((null))
[    1.392906] leds-gpio leds-gpio.0: Skipping unavailable LED gpio 0 ((null))
[    1.400075] leds-gpio leds-gpio.0: Skipping unavailable LED gpio 0 ((null))
[    1.410158] NET: Registered protocol family 10
[    1.433314] Segment Routing with IPv6
[    1.437331] NET: Registered protocol family 17
[    1.442026] 8021q: 802.1Q VLAN Support v1.8
[    1.569332] Freeing unused kernel memory: 8728K
[    1.574018] This architecture does not have kernel memory protection.
[    1.580630] Run /init as init process
[    1.617588] init: Console is alive
[    1.621587] init: - watchdog -
[    1.655029] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.667749] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    1.685925] init: - preinit -
[    2.183432] random: jshn: uninitialized urandom read (4 bytes read)
[    2.271293] random: jshn: uninitialized urandom read (4 bytes read)
[    2.537832] random: jshn: uninitialized urandom read (4 bytes read)
[    3.013611] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[    4.003213] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    6.413839] procd: - early -
[    6.417034] procd: - watchdog -
[    7.018538] procd: - watchdog -
[    7.022351] procd: - ubus -
[    7.041744] urandom_read: 3 callbacks suppressed
[    7.041759] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.077548] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.084833] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.093595] procd: - init -
[    8.151439] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.311063] xt_time: kernel timezone is -0000
[    8.405647] PPP generic driver version 2.4.2
[    8.429199] NET: Registered protocol family 24
[    8.491743] kmodloader: done loading kernel modules from /etc/modules.d/*
[    8.744981] urngd: v1.0.2 started.
[    9.050432] random: crng init done
[    9.053946] random: 1 urandom warning(s) missed due to ratelimiting
[   38.579782] br-lan: port 1(eth0.1) entered blocking state
[   38.585367] br-lan: port 1(eth0.1) entered disabled state
[   38.591653] device eth0.1 entered promiscuous mode
[   38.596604] device eth0 entered promiscuous mode
[   38.655348] br-lan: port 1(eth0.1) entered blocking state
[   38.660922] br-lan: port 1(eth0.1) entered forwarding state
[   39.556454] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

so, i haved a few hours free and tried again

so far i found these:
red led is working
green led is working
reset button is working
i2c for sfp module is working

        leds {
                compatible = "gpio-leds";

                led_power: power {
                        label = "power";
                        gpios = <&pinctrl 20 1>;
                        default-state = "off";
                };

                led_upgrade: upgrade {
                        label = "upgrade";
                        gpios = <&pinctrl 18 1>;
                        default-state = "off";
                };
        };

        keys {
                compatible = "gpio-keys-polled";
                #address-cells = <1>;
                #size-cells = <0>;
                poll-interval = <20>;

                reset {
                        label = "reset";
                        gpios = <&pinctrl 24 1>;
                        linux,code = <KEY_RESTART>;
                        debounce-interval = <60>;
                };
        };

        i2c0: i2c0 {
                compatible = "i2c-gpio";
                gpios = <&pinctrl 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN) /* sda */
                        &pinctrl 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN) /* scl */
                        >;
                i2c-gpio,delay-us = <10>;
                #address-cells = <1>;
                #size-cells = <0>;
                status = "ok";
        };

        i2c1: i2c1 {
                compatible = "i2c-gpio";
                gpios = <&pinctrl 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN) /* sda */
                        &pinctrl 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN) /* scl */
                        >;
                i2c-gpio,delay-us = <10>;
                #address-cells = <1>;
                #size-cells = <0>;
                status = "ok";
        };

and here is i2c dump of sfp

i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x08-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- 56 -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@OpenWrt:/# i2cdump 0 0x50
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x50, mode byte
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 03 04 22 00 00 00 08 00 00 00 00 01 0d 00 00 00    ??"...?....??...
10: 00 00 64 00 48 75 61 57 65 69 20 20 20 20 20 20    ..d.HuaWei
20: 20 20 20 20 00 00 00 00 4b 59 45 2d 47 42 2d 50        ....KYE-GB-P
30: 31 52 43 20 20 20 20 20 31 2e 30 20 00 00 00 57    1RC     1.0 ...W
40: 00 00 00 00 46 31 34 30 34 32 31 31 36 31 36 20    ....F1404211616
50: 20 20 20 20 31 34 30 34 32 31 20 20 00 00 00 4c        140421  ...L
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

i2c1 is for external CATV module, so there is no use

but, i still does not have any connection
switch is not working
and, what is the next step with SFP ?

ok, have eeprom definition in DTS

                sfp1_eeprom: sfp1eeprom@50 {
                       compatible = "atmel,24c02";
                       reg = <0x50>;
                       read-only;
                };

produce these:

dmesg:
at24 0-0050: 256 byte 24c02 EEPROM, read-only, 0 bytes/write

cat /sys/class/i2c-dev/i2c-0/device/0-0050/eeprom
dHuaWei          KYE-GB-P1RC     1.0 WF1404211616     140421  Lā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’ā–’

now, i am stuck with i2c-0 / 0x56,
read somewhere that this is mdio bus

                mdio0 {
                    compatible = "flx,i2c-mdio";
                    #address-cells = <1>;
                    #size-cells = <0>;
                    reg = <0x56>;

but this is out of my knowledge
any help with this ?

well, i found this when compile kernel 5.4

kmod-phylink is not available in the kernel config - generating empty package
kmod-sfp is not available in the kernel config - generating empty package

so, if i get it right, kernel for broadcom does not support these modules ??

Hi

I have one of these switches as well. How far did you come in your development?
Can I test your image?

hi @mrhaav

it is abandoned project, so i have no left any old DTS / images
sry

Ok
Thanks for your response!