On Fri, Apr 02, 2021 at 01:01:30AM +0200, Mark Kettenis wrote:
> Hi Darren,
> 
> This got broken when Patrick fixed something related to slow mode for
> the Marvel ARMADA 8040 SoC.  The diff below fixes it for me on my
> Turris MOX which uses the same SoC.  Not entirely sure what is going
> wrong here since looking at the Linux code suggests that Patrick's fix
> should work on the ARMADA 3720 as well.

Confirmed that this fixes it.  dmesg at end of mail.

> That BRUME thingy looks cute, but has a bit of an issue.  It doesn't
> really have three Ethernet ports.  Instead those ports are part of a
> switch that also connects to an Ethernet interface on the SoC.

Yeah I noticed that.  Single ethernet plus programmable switch seems to
be pretty common in this class of device.

> If you end up playing with this again, eeprom -p output would be
> appreciated.

# eeprom -p
Node 0x48
    name: ''
    model: 'GL.inet GL-MV1000 (Marvell)'
    compatible: 'gl-mv1000'
    interrupt-parent: 00000001
    #address-cells: 00000002
    #size-cells: 00000002

    Node 0xc0
        name: 'aliases'
        ethernet0: '/soc/internal-regs@d0000000/ethernet@30000'
        serial0: '/soc/internal-regs@d0000000/serial@12000'

    Node 0x140
        name: 'cpus'
        #address-cells: 00000001
        #size-cells: 00000000

        Node 0x16c
            name: 'cpu'
            device_type: 'cpu'
            compatible: 'arm,cortex-a53' + 'arm,armv8'
            reg: 00000000
            clocks: 00000002.00000010
            enable-method: 'psci'

        Node 0x1ec
            name: 'cpu'
            device_type: 'cpu'
            compatible: 'arm,cortex-a53' + 'arm,armv8'
            reg: 00000001
            clocks: 00000002.00000010
            enable-method: 'psci'

    Node 0x270
        name: 'psci'
        compatible: 'arm,psci-0.2'
        method: 'smc'

    Node 0x2ac
        name: 'timer'
        compatible: 'arm,armv8-timer'
        interrupts: 
00000001.0000000d.00000004.00000001.0000000e.00000004.00000001.0000000b.00000004.00000001.0000000a.00000004

    Node 0x314
        name: 'pmu'
        compatible: 'arm,armv8-pmuv3'
        interrupts: 00000001.00000007.00000004

    Node 0x354
        name: 'soc'
        compatible: 'simple-bus'
        #address-cells: 00000002
        #size-cells: 00000002
        ranges: 

        Node 0x3a0
            name: 'internal-regs'
            #address-cells: 00000001
            #size-cells: 00000001
            compatible: 'simple-bus'
            ranges: 00000000.00000000.d0000000.02000000

            Node 0x410
                name: 'spi'
                compatible: 'marvell,armada-3700-spi'
                #address-cells: 00000001
                #size-cells: 00000000
                reg: 00010600.00000a00
                clocks: 00000002.00000007
                interrupts: 00000000.00000000.00000004
                num-cs: 00000004
                status: 'okay'

                Node 0x4c8
                    name: 'flash'
                    reg: 00000000
                    compatible: 'jedec,spi-nor'
                    spi-max-frequency: 0632ea00
                    m25p,fast-read: 

                    Node 0x51c
                        name: 'partitions'
                        compatible: 'fixed-partitions'
                        #address-cells: 00000001
                        #size-cells: 00000001

                        Node 0x56c
                            name: 'partition'
                            label: 'u-boot'
                            reg: 00000000.000f0000

                        Node 0x5a8
                            name: 'partition'
                            label: 'u-boot-env'
                            reg: 000f0000.00008000

                        Node 0x5ec
                            name: 'partition'
                            label: 'art'
                            reg: 000f8000.00008000
                            linux,phandle: 00000008
                            phandle: 00000008

            Node 0x654
                name: 'i2c'
                compatible: 'marvell,armada-3700-i2c'
                reg: 00011000.00000024
                #address-cells: 00000001
                #size-cells: 00000000
                clocks: 00000002.0000000a
                interrupts: 00000000.00000001.00000004
                mrvl,i2c-fast-mode: 
                status: 'disabled'

            Node 0x710
                name: 'i2c'
                compatible: 'marvell,armada-3700-i2c'
                reg: 00011080.00000024
                #address-cells: 00000001
                #size-cells: 00000000
                clocks: 00000002.00000009
                interrupts: 00000000.00000002.00000004
                mrvl,i2c-fast-mode: 
                status: 'disabled'

            Node 0x7cc
                name: 'serial'
                compatible: 'marvell,armada-3700-uart'
                reg: 00012000.00000200
                clocks: 00000003
                interrupts: 00000000.0000000b.00000004
                status: 'okay'

            Node 0x85c
                name: 'nb-periph-clk'
                compatible: 'marvell,armada-3700-periph-clock-nb'
                reg: 00013000.00000100
                clocks: 
00000004.00000000.00000004.00000001.00000004.00000002.00000004.00000003.00000003
                #clock-cells: 00000001
                linux,phandle: 00000002
                phandle: 00000002

            Node 0x91c
                name: 'sb-periph-clk'
                compatible: 'marvell,armada-3700-periph-clock-sb'
                reg: 00018000.00000100
                clocks: 
00000004.00000000.00000004.00000001.00000004.00000002.00000004.00000003.00000003
                #clock-cells: 00000001
                linux,phandle: 00000007
                phandle: 00000007

            Node 0x9dc
                name: 'tbg'
                compatible: 'marvell,armada-3700-tbg-clock'
                reg: 00013200.00000100
                clocks: 00000003
                #clock-cells: 00000001
                linux,phandle: 00000004
                phandle: 00000004

            Node 0xa70
                name: 'pinctrl'
                compatible: 'marvell,armada3710-nb-pinctrl' + 'syscon' + 
'simple-mfd'
                reg: 00013800.00000100.00013c00.00000020
                linux,phandle: 00000005
                phandle: 00000005

                Node 0xafc
                    name: 'gpio'
                    #gpio-cells: 00000002
                    gpio-ranges: 00000005.00000000.00000000.00000024
                    gpio-controller: 
                    interrupts: 
00000000.00000033.00000004.00000000.00000034.00000004.00000000.00000035.00000004.00000000.00000036.00000004.00000000.00000037.00000004.00000000.00000038.00000004.00000000.00000039.00000004.00000000.0000003a.00000004.00000000.00000098.00000004.00000000.00000099.00000004.00000000.0000009a.00000004.00000000.0000009b.00000004
                    linux,phandle: 0000000d
                    phandle: 0000000d

                Node 0xc00
                    name: 'xtal-clk'
                    compatible: 'marvell,armada-3700-xtal-clock'
                    clock-output-names: 'xtal'
                    #clock-cells: 00000000
                    linux,phandle: 00000003
                    phandle: 00000003

                Node 0xc84
                    name: 'spi-quad-pins'
                    groups: 'spi_quad'
                    function: 'spi'

                Node 0xcc4
                    name: 'i2c1-pins'
                    groups: 'i2c1'
                    function: 'i2c'

                Node 0xcfc
                    name: 'i2c2-pins'
                    groups: 'i2c2'
                    function: 'i2c'

                Node 0xd34
                    name: 'uart1-pins'
                    groups: 'uart1'
                    function: 'uart'

                Node 0xd70
                    name: 'uart2-pins'
                    groups: 'uart2'
                    function: 'uart'

                Node 0xdac
                    name: 'mmc-pins'
                    groups: 'emmc_nb'
                    function: 'emmc'
                    linux,phandle: 00000010
                    phandle: 00000010

            Node 0xe0c
                name: 'syscon'
                compatible: 'marvell,armada-3700-nb-pm' + 'syscon'
                reg: 00014000.00000060

            Node 0xe68
                name: 'pinctrl'
                compatible: 'marvell,armada3710-sb-pinctrl' + 'syscon' + 
'simple-mfd'
                reg: 00018800.00000100.00018c00.00000020
                linux,phandle: 00000006
                phandle: 00000006

                Node 0xef4
                    name: 'gpio'
                    #gpio-cells: 00000002
                    gpio-ranges: 00000006.00000000.00000000.0000001e
                    gpio-controller: 
                    interrupts: 
00000000.000000a0.00000004.00000000.0000009f.00000004.00000000.0000009e.00000004.00000000.0000009d.00000004.00000000.0000009c.00000004

                Node 0xf84
                    name: 'mii-pins'
                    groups: 'rgmii'
                    function: 'mii'

                Node 0xfbc
                    name: 'sdio-pins'
                    groups: 'sdio_sb'
                    function: 'sdio'
                    linux,phandle: 0000000f
                    phandle: 0000000f

            Node 0x101c
                name: 'ethernet'
                local-mac-address: 9483c403.b0d9
                compatible: 'marvell,armada-3700-neta'
                reg: 00030000.00004000
                interrupts: 00000000.0000002a.00000004
                clocks: 00000007.00000008
                status: 'okay'
                phy-mode: 'rgmii-id'
                mtd-mac-address: 00000008.00000000
                linux,phandle: 00000009
                phandle: 00000009

                Node 0x110c
                    name: 'fixed-link'
                    speed: 000003e8
                    full-duplex: 

            Node 0x1140
                name: 'mdio'
                #address-cells: 00000001
                #size-cells: 00000000
                compatible: 'marvell,orion-mdio'
                reg: 00032004.00000004

                Node 0x11a4
                    name: 'switch0'
                    compatible: 'marvell,mv88e6085'
                    #address-cells: 00000001
                    #size-cells: 00000000
                    reg: 00000001
                    dsa,member: 00000000.00000000

                    Node 0x1218
                        name: 'ports'
                        #address-cells: 00000001
                        #size-cells: 00000000

                        Node 0x1244
                            name: 'port'
                            reg: 00000000
                            label: 'cpu'
                            ethernet: 00000009

                        Node 0x1284
                            name: 'port'
                            reg: 00000001
                            label: 'wan'
                            phy-handle: 0000000a

                        Node 0x12c4
                            name: 'port'
                            reg: 00000002
                            label: 'lan0'
                            phy-handle: 0000000b

                        Node 0x1308
                            name: 'port'
                            reg: 00000003
                            label: 'lan1'
                            phy-handle: 0000000c

                    Node 0x1350
                        name: 'mdio'
                        #address-cells: 00000001
                        #size-cells: 00000000

                        Node 0x137c
                            name: 'switch0phy0'
                            reg: 00000011
                            linux,phandle: 0000000a
                            phandle: 0000000a

                        Node 0x13c4
                            name: 'switch0phy1'
                            reg: 00000012
                            linux,phandle: 0000000b
                            phandle: 0000000b

                        Node 0x140c
                            name: 'switch0phy2'
                            reg: 00000013
                            linux,phandle: 0000000c
                            phandle: 0000000c

            Node 0x1460
                name: 'ethernet'
                compatible: 'marvell,armada-3700-neta'
                reg: 00040000.00004000
                interrupts: 00000000.0000002d.00000004
                clocks: 00000007.00000007
                status: 'disabled'

            Node 0x14f8
                name: 'usb'
                compatible: 'marvell,armada3700-xhci' + 'generic-xhci'
                reg: 00058000.00004000
                interrupts: 00000000.00000003.00000004
                clocks: 00000007.0000000c
                status: 'okay'

            Node 0x1594
                name: 'usb'
                compatible: 'marvell,armada-3700-ehci'
                reg: 0005e000.00002000
                interrupts: 00000000.00000011.00000004
                status: 'okay'

            Node 0x1610
                name: 'u3d'
                compatible: 'marvell,armada3700-u3d'
                reg: 00050000.00002000
                interrupts: 00000000.0000000f.00000004
                clocks: 00000007.0000000c
                status: 'okay'

            Node 0x169c
                name: 'udc'
                compatible: 'marvell,mv-udc'
                reg: 00054100.00002000
                interrupts: 00000000.0000000f.00000004
                clocks: 00000007.0000000c
                status: 'okay'

            Node 0x1720
                name: 'xor'
                compatible: 'marvell,armada-3700-xor'
                reg: 00060900.00000100.00060b00.00000100

                Node 0x1770
                    name: 'xor10'
                    interrupts: 00000000.0000002f.00000004

                Node 0x1798
                    name: 'xor11'
                    interrupts: 00000000.00000030.00000004

            Node 0x17c4
                name: 'sdhci'
                compatible: 'marvell,armada-3700-sdhci' + 'marvell,sdhci-xenon'
                reg: 000d0000.00000300.0001e808.00000004
                interrupts: 00000000.00000019.00000004
                clocks: 00000002.00000000
                clock-names: 'core'
                status: 'okay'
                wp-inverted: 
                bus-width: 00000004
                cd-gpios: 0000000d.00000011.00000001
                marvell,pad-type: 'sd'
                vqmmc-supply: 0000000e
                pinctrl-names: 'default'
                pinctrl-0: 0000000f
                no-1-8-v: 

            Node 0x1908
                name: 'sdhci'
                compatible: 'marvell,armada-3700-sdhci' + 'marvell,sdhci-xenon'
                reg: 000d8000.00000300.00017808.00000004
                interrupts: 00000000.0000001a.00000004
                clocks: 00000002.00000000
                clock-names: 'core'
                status: 'okay'
                non-removable: 
                bus-width: 00000008
                mmc-ddr-1_8v: 
                mmc-hs400-1_8v: 
                marvell,xenon-emmc: 
                marvell,xenon-tun-count: 00000009
                marvell,pad-type: 'fixed-1-8v'
                pinctrl-names: 'default'
                pinctrl-0: 00000010
                no-sd: 
                no-sdio: 

            Node 0x1a6c
                name: 'sata'
                compatible: 'marvell,armada-3700-ahci'
                reg: 000e0000.00002000
                interrupts: 00000000.0000001b.00000004
                status: 'okay'

            Node 0x1ae8
                name: 'interrupt-controller'
                compatible: 'arm,gic-v3'
                #interrupt-cells: 00000003
                interrupt-controller: 
                reg: 
01d00000.00010000.01d40000.00040000.01d80000.00002000.01d90000.00002000.01da0000.00020000
                interrupts: 00000001.00000009.00000004
                linux,phandle: 00000001
                phandle: 00000001

        Node 0x1bb4
            name: 'pcie'
            compatible: 'marvell,armada-3700-pcie'
            device_type: 'pci'
            status: 'okay'
            reg: 00000000.d0070000.00000000.00020000
            #address-cells: 00000003
            #size-cells: 00000002
            bus-range: 00000000.000000ff
            interrupts: 00000000.0000001d.00000004
            #interrupt-cells: 00000001
            msi-parent: 00000011
            msi-controller: 
            ranges: 
82000000.00000000.e8000000.00000000.e8000000.00000000.01000000.81000000.00000000.e9000000.00000000.e9000000.00000000.00010000
            interrupt-map-mask: 00000000.00000000.00000000.00000007
            interrupt-map: 
00000000.00000000.00000000.00000001.00000012.00000000.00000000.00000000.00000000.00000002.00000012.00000001.00000000.00000000.00000000.00000003.00000012.00000002.00000000.00000000.00000000.00000004.00000012.00000003
            max-link-speed: 00000001
            linux,phandle: 00000011
            phandle: 00000011

            Node 0x1da4
                name: 'interrupt-controller'
                interrupt-controller: 
                #interrupt-cells: 00000001
                linux,phandle: 00000012
                phandle: 00000012

    Node 0x1e08
        name: 'chosen'
        openbsd,dma-constraint: 00000000.00000000.ffffffff.ffffffff
        openbsd,uefi-mmap-desc-ver: 00000001
        openbsd,uefi-mmap-desc-size: 00000028
        openbsd,uefi-mmap-size: 000084d0
        openbsd,uefi-mmap-start: 00000000.3e601cf0
        openbsd,uefi-system-table: 00000000.3ffa5488
        openbsd,bootduid: 9e51f250.b602291d
        openbsd,boothowto: 00010000
        bootargs: 'sd0a:/bsd'
        stdout-path: 'serial0:115200n8'

    Node 0x1ee8
        name: 'memory'
        device_type: 'memory'
        reg: 
00000000.00000000.00000000.40000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000

    Node 0x1f5c
        name: 'regulator'
        compatible: 'regulator-gpio'
        regulator-name: 'vcc_sd1'
        regulator-min-microvolt: 001b7740
        regulator-max-microvolt: 00325aa0
        regulator-boot-on: 
        gpios: 0000000d.00000004.00000000
        gpios-states: 00000000
        states: 001b7740.00000001.00325aa0.00000000
        enable-active-high: 
        linux,phandle: 0000000e
        phandle: 0000000e

OpenBSD 6.9-beta (GENERIC.MP) #0: Thu Apr  1 19:30:31 AEDT 2021
    dtuc...@brume.dtucker.net:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 1032523776 (984MB)
avail mem = 968355840 (923MB)
random: good seed from bootblocks
mainbus0 at root: GL.inet GL-MV1000 (Marvell)
psci0 at mainbus0: PSCI 1.0
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1
D-cache
cpu0: 256KB 64b/line 16-way L2 cache
cpu0: CRC32,SHA2,SHA1,AES+PMULL,ASID16
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1
D-cache
cpu1: 256KB 64b/line 16-way L2 cache
cpu1: CRC32,SHA2,SHA1,AES+PMULL,ASID16
efi0 at mainbus0: UEFI 2.0.5
efi0: Das U-boot rev 0x0
apm0 at mainbus0
agtimer0 at mainbus0: 12500 kHz
"pmu" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
simplebus1 at simplebus0: "internal-regs"
mvclock0 at simplebus1
mvclock1 at simplebus1
mvclock2 at simplebus1
mvpinctrl0 at simplebus1
syscon0 at simplebus1: "syscon"
mvpinctrl1 at simplebus1
agintc0 at simplebus1 shift 4:3 nirq 224 nredist 2 ipi: 0, 1:
"interrupt-controller"
mvspi0 at simplebus1
mvuart0 at simplebus1
mvneta0 at simplebus1
mvneta0: Ethernet address 94:83:c4:03:b0:d9
mvmdio0 at simplebus1: "mdio"
mvsw0 at mvmdio0 phy 1: 88E6141 rev 0
xhci0 at simplebus1, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev
3.00/1.00 addr 1
"usb" at simplebus1 not configured
"u3d" at simplebus1 not configured
"udc" at simplebus1 not configured
"xor" at simplebus1 not configured
sdhc0 at simplebus1
sdhc0: SDHC 3.0, 400 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed, dma
sdhc1 at simplebus1
sdhc1: SDHC 3.0, 400 MHz base clock
sdmmc1 at sdhc1: 8-bit, sd high-speed, mmc high-speed, ddr52, dma
"sata" at simplebus1 not configured
mvkpcie0 at simplebus0
mvkpcie0: timeout
"regulator" at mainbus0 not configured
scsibus0 at sdmmc1: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Samsung, 8GTF4R, 0000> removable
sd0: 7456MB, 512 bytes/sector, 15269888 sectors
scsibus1 at sdmmc0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <SD/MMC, SH32G, 0080> removable
sd1: 30436MB, 512 bytes/sector, 62333952 sectors
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd1a (9e51f250b602291d.a) swap on sd1b dump on sd1b
WARNING: CHECK AND RESET THE DATE!


-- 
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Reply via email to