Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipq806x: add RPM cc, idle states and minor stuff #494

Closed
wants to merge 8 commits into from

Conversation

dissent1
Copy link
Contributor

@dissent1 dissent1 commented Nov 6, 2016

This PR adds support for RPM Clock Controller, RPM message RAM and cpu idle states.

Please take into account, that 179 rpm patch is a modified version of the one that has been submitted upstream. The original patch is for apq8064 board only, so I modified it to work on ipq806x only.
Sooner or later this patch will go upstream and we'll have to make another patch that adds support for ipq806x in addition to apq8064 but not replacing it.

003 upstream patch has also been modified- cxo/pxo clocks are left at 25kHz/25kHz in contrary to upstream changes as it's not completely stable now and requires more testing.

Also replacing existing patch for WDT Barktime with set of patches from upstream.

@heinzek

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
@heinzek
Copy link
Contributor

heinzek commented Nov 6, 2016

Hi @dissent1 I apply your patch and firmware booting up corectly.
Here is bootlog:

root@lede:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.30 (hyniu@o2.pl) (gcc version 5.4.0 (LEDE GCC 5.4.0 r2098+1) ) #0 SMP Sat Nov 5 21:24:25 2016
[    0.000000] CPU: ARMv7 Processor [512f04d0] revision 0 (ARMv7), cr=10c5787d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] Machine model: TP-Link Archer C2600
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 122880
[    0.000000] free_area_init_node: node 0, pgdat c07eb480, node_mem_map ddc39000
[    0.000000]   Normal zone: 960 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 122880 pages, LIFO batch:31
[    0.000000] PERCPU: Embedded 11 pages/cpu @ddc10000 s13824 r8192 d23040 u45056
[    0.000000] pcpu-alloc: s13824 r8192 d23040 u45056 alloc=11*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 121920
[    0.000000] Kernel command line:
[    0.000000] Bootloader command line (ignored): console=ttyHSL1,115200n8 root=mtd:rootfs rootfstype=squashfs
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 480564K/491520K available (4244K kernel code, 244K rwdata, 1540K rodata, 220K init, 228K bss, 10956K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xde800000 - 0xff800000   ( 528 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xde000000   ( 480 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc07ae63c   (5786 kB)
[    0.000000]       .init : 0xc07af000 - 0xc07e6000   ( 220 kB)
[    0.000000]       .data : 0xc07e6000 - 0xc0823280   ( 245 kB)
[    0.000000]        .bss : 0xc0826000 - 0xc085f040   ( 229 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: dg_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 305801671480 ns
[    0.000007] sched_clock: 32 bits at 6MHz, resolution 160ns, wraps every 343597383600ns
[    0.000020] Switching to timer-based delay loop, resolution 160ns
[    0.000203] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS (lpj=62500)
[    0.000227] pid_max: default: 32768 minimum: 301
[    0.000331] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000348] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000955] CPU: Testing write buffer coherency: ok
[    0.001315] Setting up static identity map for 0x42208280 - 0x422082d8
[    0.004360] Brought up 2 CPUs
[    0.004379] SMP: Total of 2 processors activated (25.00 BogoMIPS).
[    0.004391] CPU: All CPU(s) started in SVC mode.
[    0.012923] VFP support v0.3: implementor 51 architecture 64 part 4d variant 2 rev 0
[    0.013156] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.013300] pinctrl core: initialized pinctrl subsystem
[    0.014633] NET: Registered protocol family 16
[    0.014894] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.041420] cpuidle: using governor ladder
[    0.072436] cpuidle: using governor menu
[    0.083994] gpiochip_add: registered GPIOs 0 to 68 on device: 800000.pinmux
[    0.084017] GPIO chip 800000.pinmux: created GPIO range 0->68 ==> 800000.pinmux PIN 0->68
[    0.085539] qcom_rpm 108000.rpm: RPM firmware 3.0.16777342
[    0.126660] pps_core: LinuxPPS API ver. 1 registered
[    0.126675] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.126717] PTP clock support registered
[    0.127912] clocksource: Switched to clocksource dg_timer
[    0.129181] NET: Registered protocol family 2
[    0.129742] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.129783] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.129836] TCP: Hash tables configured (established 4096 bind 4096)
[    0.129887] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.129908] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.130091] NET: Registered protocol family 1
[    0.130153] PCI: CLS 0 bytes, default 64
[    0.131409] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.131505] No memory allocated for crashlog
[    0.138602] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.138632] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.141065] io scheduler noop registered
[    0.141087] io scheduler deadline registered (default)
[    0.141703] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio_export/usb1_power[0]' - status (0)
[    0.141840] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio_export/usb2_power[0]' - status (0)
[    0.141943] gpio-export gpio_export: 2 gpio(s) exported
[    0.142472] qcom-pcie 1b500000.pci: GPIO lookup for consumer perst
[    0.142489] qcom-pcie 1b500000.pci: using device tree for GPIO lookup
[    0.142506] of_get_named_gpiod_flags: can't parse 'perst-gpios' property of node '/soc/pci@1b500000[0]'
[    0.142529] of_get_named_gpiod_flags: parsed 'perst-gpio' property of node '/soc/pci@1b500000[0]' - status (0)
[    0.142601] 1b500000.pci supply vdda not found, using dummy regulator
[    0.142688] 1b500000.pci supply vdda_phy not found, using dummy regulator
[    0.142774] 1b500000.pci supply vdda_refclk not found, using dummy regulator
[    0.143184] PCI host bridge /soc/pci@1b500000 ranges:
[    0.143228]    IO 0x0fe00000..0x0fefffff -> 0x0fe00000
[    0.143251]   MEM 0x08000000..0x0fdfffff -> 0x08000000
[    0.175930] qcom-pcie 1b500000.pci: PCI host bridge to bus 0000:00
[    0.175952] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.175972] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0xfe00000-0xfefffff])
[    0.175988] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fdfffff]
[    0.176004] pci_bus 0000:00: scanning bus
[    0.176050] pci 0000:00:00.0: [17cb:0101] type 01 class 0x060400
[    0.176157] pci 0000:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
[    0.176210] pci 0000:00:00.0: supports D1
[    0.176225] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.176245] pci 0000:00:00.0: PME# disabled
[    0.176482] pci_bus 0000:00: fixups for bus
[    0.176507] PCI: bus0: Fast back to back transfers disabled
[    0.176526] pci 0000:00:00.0: scanning [bus 01-01] behind bridge, pass 0
[    0.176663] pci_bus 0000:01: scanning bus
[    0.176806] pci 0000:01:00.0: [168c:0040] type 00 class 0x028000
[    0.177122] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.177487] pci 0000:01:00.0: calling pci_fixup_ide_bases+0x0/0x44
[    0.177866] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.177905] pci 0000:01:00.0: PME# disabled
[    0.178306] pci_bus 0000:01: fixups for bus
[    0.178367] PCI: bus1: Fast back to back transfers disabled
[    0.178381] pci_bus 0000:01: bus scan returning with max=01
[    0.178403] pci 0000:00:00.0: scanning [bus 01-01] behind bridge, pass 1
[    0.178422] pci_bus 0000:00: bus scan returning with max=01
[    0.178493] pci 0000:00:00.0: fixup irq: got 132
[    0.178507] pci 0000:00:00.0: assigning IRQ 132
[    0.178567] pci 0000:01:00.0: fixup irq: got 132
[    0.178581] pci 0000:01:00.0: assigning IRQ 132
[    0.178641] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x081fffff]
[    0.178664] pci 0000:01:00.0: BAR 0: assigned [mem 0x08000000-0x081fffff 64bit]
[    0.178768] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.178789] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x081fffff]
[    0.179132] aer 0000:00:00.0:pcie02: service driver aer loaded
[    0.179379] qcom-pcie 1b700000.pci: GPIO lookup for consumer perst
[    0.179394] qcom-pcie 1b700000.pci: using device tree for GPIO lookup
[    0.179412] of_get_named_gpiod_flags: can't parse 'perst-gpios' property of node '/soc/pci@1b700000[0]'
[    0.179434] of_get_named_gpiod_flags: parsed 'perst-gpio' property of node '/soc/pci@1b700000[0]' - status (0)
[    0.179512] 1b700000.pci supply vdda not found, using dummy regulator
[    0.179593] 1b700000.pci supply vdda_phy not found, using dummy regulator
[    0.179677] 1b700000.pci supply vdda_refclk not found, using dummy regulator
[    0.180080] PCI host bridge /soc/pci@1b700000 ranges:
[    0.180112]    IO 0x31e00000..0x31efffff -> 0x31e00000
[    0.180132]   MEM 0x2e000000..0x31dfffff -> 0x2e000000
[    0.209219] qcom-pcie 1b700000.pci: PCI host bridge to bus 0001:00
[    0.209237] pci_bus 0001:00: root bus resource [bus 00-ff]
[    0.209253] pci_bus 0001:00: root bus resource [mem 0x2e000000-0x31dfffff]
[    0.209266] pci_bus 0001:00: scanning bus
[    0.209313] pci 0001:00:00.0: [17cb:0101] type 01 class 0x060400
[    0.209403] pci 0001:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
[    0.209451] pci 0001:00:00.0: supports D1
[    0.209464] pci 0001:00:00.0: PME# supported from D0 D1 D3hot
[    0.209480] pci 0001:00:00.0: PME# disabled
[    0.209695] pci_bus 0001:00: fixups for bus
[    0.209716] PCI: bus0: Fast back to back transfers disabled
[    0.209733] pci 0001:00:00.0: scanning [bus 01-01] behind bridge, pass 0
[    0.209861] pci_bus 0001:01: scanning bus
[    0.210006] pci 0001:01:00.0: [168c:0040] type 00 class 0x028000
[    0.210317] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.210680] pci 0001:01:00.0: calling pci_fixup_ide_bases+0x0/0x44
[    0.211058] pci 0001:01:00.0: PME# supported from D0 D3hot D3cold
[    0.211096] pci 0001:01:00.0: PME# disabled
[    0.211390] pci_bus 0001:01: fixups for bus
[    0.211451] PCI: bus1: Fast back to back transfers disabled
[    0.211465] pci_bus 0001:01: bus scan returning with max=01
[    0.211485] pci 0001:00:00.0: scanning [bus 01-01] behind bridge, pass 1
[    0.211506] pci_bus 0001:00: bus scan returning with max=01
[    0.211552] pcieport 0000:00:00.0: fixup irq: got 132
[    0.211566] pcieport 0000:00:00.0: assigning IRQ 132
[    0.211624] pci 0000:01:00.0: fixup irq: got 132
[    0.211639] pci 0000:01:00.0: assigning IRQ 132
[    0.211703] pci 0001:00:00.0: fixup irq: got 165
[    0.211716] pci 0001:00:00.0: assigning IRQ 165
[    0.211775] pci 0001:01:00.0: fixup irq: got 165
[    0.211788] pci 0001:01:00.0: assigning IRQ 165
[    0.211839] pci 0001:00:00.0: BAR 8: assigned [mem 0x2e000000-0x2e1fffff]
[    0.211861] pci 0001:01:00.0: BAR 0: assigned [mem 0x2e000000-0x2e1fffff 64bit]
[    0.211961] pci 0001:00:00.0: PCI bridge to [bus 01]
[    0.211980] pci 0001:00:00.0:   bridge window [mem 0x2e000000-0x2e1fffff]
[    0.212303] aer 0001:00:00.0:pcie02: service driver aer loaded
[    0.214518] gsbi 16300000.gsbi: GSBI port protocol: 6 crci: 0
[    0.215566] gsbi 1a200000.gsbi: GSBI port protocol: 3 crci: 0
[    0.216610] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.219427] msm_serial 16340000.serial: msm_serial: detected port #0
[    0.219532] msm_serial 16340000.serial: uartclk = 1843200
[    0.219593] 16340000.serial: ttyMSM0 at MMIO 0x16340000 (irq = 166, base_baud = 115200) is a MSM
[    0.219628] msm_serial: console setup on port #0
[    0.865714] console [ttyMSM0] enabled
[    0.870496] msm_serial: driver initialized
[    0.880473] loop: module loaded
[    0.881613] spi_qup 1a280000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.882498] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/soc/gsbi@1a200000/spi@1a280000[0]' - status (0)
[    0.883483] m25p80 spi32766.0: found mx25u25635f, expected s25fl256s1
[    0.890004] m25p80 spi32766.0: mx25u25635f (32768 Kbytes)
[    0.896330] 25 ofpart partitions found on MTD device spi32766.0
[    0.901592] Creating 25 MTD partitions on "spi32766.0":
[    0.907250] 0x000000000000-0x000000020000 : "SBL1"
[    0.913658] 0x000000020000-0x000000040000 : "MIBIB"
[    0.918373] 0x000000040000-0x000000060000 : "SBL2"
[    0.922943] 0x000000060000-0x000000090000 : "SBL3"
[    0.927920] 0x000000090000-0x0000000a0000 : "DDRCONFIG"
[    0.932642] 0x0000000a0000-0x0000000b0000 : "SSD"
[    0.937687] 0x0000000b0000-0x0000000e0000 : "TZ"
[    0.942611] 0x0000000e0000-0x000000100000 : "RPM"
[    0.947331] 0x000000100000-0x000000170000 : "fs-uboot"
[    0.951995] 0x000000170000-0x0000001b0000 : "uboot-env"
[    0.956971] 0x0000001b0000-0x0000001f0000 : "radio"
[    0.962187] 0x0000001f0000-0x0000003f0000 : "os-image"
[    0.966856] 0x0000003f0000-0x000001ef0000 : "rootfs"
[    0.972269] mtd: device 12 (rootfs) set to be root filesystem
[    0.976542] 1 squashfs-split partitions found on MTD device rootfs
[    0.982073] 0x0000007f0000-0x000001ef0000 : "rootfs_data"
[    0.989101] 0x000001ef0000-0x000001ef0200 : "default-mac"
[    0.994500] 0x000001ef0200-0x000001ef0400 : "pin"
[    0.999873] 0x000001ef0400-0x000001f00000 : "product-info"
[    1.004434] 0x000001f00000-0x000001f10000 : "partition-table"
[    1.010138] 0x000001f10000-0x000001f20000 : "soft-version"
[    1.015857] 0x000001f20000-0x000001f30000 : "support-list"
[    1.021360] 0x000001f30000-0x000001f40000 : "profile"
[    1.026712] 0x000001f40000-0x000001f50000 : "default-config"
[    1.031738] 0x000001f50000-0x000001f90000 : "user-config"
[    1.037386] 0x000001f90000-0x000001fd0000 : "qos-db"
[    1.043123] 0x000001fd0000-0x000001fe0000 : "usb-config"
[    1.047930] 0x000001fe0000-0x000002000000 : "log"
[    1.053893] libphy: Fixed MDIO Bus: probed
[    1.056967] of_get_named_gpiod_flags: parsed 'gpios' property of node '/soc/mdio[0]' - status (0)
[    1.056991] of_get_named_gpiod_flags: parsed 'gpios' property of node '/soc/mdio[1]' - status (0)
[    1.057009] of_get_named_gpiod_flags: can't parse 'gpios' property of node '/soc/mdio[2]'
[    1.057142] libphy: GPIO Bitbanged MDIO: probed
[    1.082512] switch0: Atheros AR8337 rev. 2 switch registered on gpio-0
[    1.313445] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/soc/ethernet@37200000/fixed-link[0]'
[    1.314031] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    1.314056]  Ring mode enabled
[    1.318055]  DMA HW capability register supported
[    1.321094]  Enhanced/Alternate descriptors
[    1.325780]  Enabled extended descriptors
[    1.329859]  RX Checksum Offload Engine supported (type 2)
[    1.333942]  TX Checksum insertion supported
[    1.339386]  Wake-Up On Lan supported
[    1.343750]  Enable RX Mitigation via HW Watchdog Timer
[    1.348301] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/soc/ethernet@37400000/fixed-link[0]'
[    1.348777] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    1.352345]  Ring mode enabled
[    1.357550]  DMA HW capability register supported
[    1.360590]  Enhanced/Alternate descriptors
[    1.365276]  Enabled extended descriptors
[    1.369345]  RX Checksum Offload Engine supported (type 2)
[    1.373438]  TX Checksum insertion supported
[    1.378903]  Wake-Up On Lan supported
[    1.383246]  Enable RX Mitigation via HW Watchdog Timer
[    1.387443] i2c /dev entries driver
[    1.392989] Speed bin: 0
[    1.395309] PVS bin: 1
[    1.398575] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    1.400297] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    1.407619] sdhci: Secure Digital Host Controller Interface driver
[    1.414839] sdhci: Copyright(c) Pierre Ossman
[    1.421108] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.427310] L2 @ QSB rate. Forcing new rate.
[    1.431353] L2 @ 384000 KHz
[    1.435539] CPU0 @ 800000 KHz
[    1.437935] CPU1 @ QSB rate. Forcing new rate.
[    1.441211] CPU1 @ 384000 KHz
[    1.446972] NET: Registered protocol family 10
[    1.449737] NET: Registered protocol family 17
[    1.452852] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.457517] 8021q: 802.1Q VLAN Support v1.8
[    1.470180] Registering SWP/SWPB emulation handler
[    1.476018] cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:0, -19
[    1.479485] cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:1, -19
[    1.487346] hctosys: unable to open rtc device (rtc0)
[    1.511728] VFS: Mounted root (squashfs filesystem) readonly on device 31:12.
[    1.512222] Freeing unused kernel memory: 220K (c07af000 - c07e6000)
[    1.753130] random: nonblocking pool is initialized
[    2.920478] init: Console is alive
[    2.920606] init: - watchdog -
[    4.774063] usbcore: registered new interface driver usbfs
[    4.774142] usbcore: registered new interface driver hub
[    4.778594] usbcore: registered new device driver usb
[    4.785375] exFAT: Version 1.2.9
[    4.796485] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/wifi[0]' - status (0)
[    4.796508] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/reset[0]' - status (0)
[    4.796527] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/wps[0]' - status (0)
[    4.796543] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/ledgeneral[0]' - status (0)
[    4.800122] SCSI subsystem initialized
[    4.803376] libata version 3.00 loaded.
[    4.807254] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.807753] ehci-platform: EHCI generic platform driver
[    4.815752] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.818396] ohci-platform: OHCI generic platform driver
[    5.329495] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    5.329540] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    5.334025] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[    5.341568] xhci-hcd xhci-hcd.0.auto: irq 168, io mem 0x11000000
[    5.350766] hub 1-0:1.0: USB hub found
[    5.356384] hub 1-0:1.0: 1 port detected
[    5.360234] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    5.363996] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    5.369433] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.377329] hub 2-0:1.0: USB hub found
[    5.385298] hub 2-0:1.0: 1 port detected
[    5.389057] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.392822] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    5.398324] xhci-hcd xhci-hcd.1.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[    5.405693] xhci-hcd xhci-hcd.1.auto: irq 169, io mem 0x10000000
[    5.414912] hub 3-0:1.0: USB hub found
[    5.420670] hub 3-0:1.0: 1 port detected
[    5.424361] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.428302] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    5.433610] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.441689] hub 4-0:1.0: USB hub found
[    5.449507] hub 4-0:1.0: 1 port detected
[    5.453729] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/lan[0]' - status (0)
[    5.453810] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/usb4[0]' - status (0)
[    5.453877] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/usb2[0]' - status (0)
[    5.453939] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wps[0]' - status (0)
[    5.454002] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wan_blue[0]' - status (0)
[    5.454067] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/status[0]' - status (0)
[    5.454132] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/ledgnr[0]' - status (0)
[    5.455434] usbcore: registered new interface driver usb-storage
[    5.457454] init: - preinit -
[    8.950097] ipq806x-gmac-dwmac 37400000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
[   10.187684] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   10.192242] urandom-seed: Seed file not found (/etc/urandom.seed)
[   10.240064] procd: - early -
[   10.240130] procd: - watchdog -
[   10.884713] procd: - ubus -
[   10.944211] procd: - init -
[   11.126090] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   11.131113] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.135987] Loading modules backported from Linux version wt-2016-10-03-1-g6fcb1a6
[   11.136011] Backport generated by backports.git backports-20160324-9-g0e38f5c
[   11.162727] ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142)
[   11.162813] ath10k_pci 0000:01:00.0: enabling bus mastering
[   11.163270] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   11.291889] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
[   11.291933] ath10k_pci 0000:01:00.0: Falling back to user helper
[   11.341048] firmware ath10k!pre-cal-pci-0000:01:00.0.bin: firmware_loading_store: map pages failed
[   11.341276] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/cal-pci-0000:01:00.0.bin failed with error -2
[   11.348990] ath10k_pci 0000:01:00.0: Falling back to user helper
[   16.986082] ath10k_pci 0000:01:00.0: qca99x0 hw2.0 target 0x01000000 chip_id 0x003b01ff sub 168c:0002
[   16.986130] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   16.997176] ath10k_pci 0000:01:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01
[   17.003129] ath10k_pci 0000:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0040,subsystem-vendor=168c,subsystem-device=0002 from ath10k/QCA99X0/hw2.0/board-2.bin
[   17.012059] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 7e56fd07
[   18.193755] ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1
[   18.329836] ath: EEPROM regdomain: 0x0
[   18.329855] ath: EEPROM indicates default country code should be used
[   18.329871] ath: doing EEPROM country->regdmn map search
[   18.329893] ath: country maps to regdmn code: 0x3a
[   18.329910] ath: Country alpha2 being used: US
[   18.329924] ath: Regpair used: 0x3a
[   18.336446] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142)
[   18.336562] ath10k_pci 0001:01:00.0: enabling bus mastering
[   18.337142] ath10k_pci 0001:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   18.469902] ath10k_pci 0001:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0001:01:00.0.bin failed with error -2
[   18.469952] ath10k_pci 0001:01:00.0: Falling back to user helper
[   18.749563] firmware ath10k!pre-cal-pci-0001:01:00.0.bin: firmware_loading_store: map pages failed
[   18.749804] ath10k_pci 0001:01:00.0: Direct firmware load for ath10k/cal-pci-0001:01:00.0.bin failed with error -2
[   18.757427] ath10k_pci 0001:01:00.0: Falling back to user helper
[   23.993502] ath10k_pci 0001:01:00.0: qca99x0 hw2.0 target 0x01000000 chip_id 0x003b01ff sub 168c:0002
[   23.993541] ath10k_pci 0001:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   24.003798] ath10k_pci 0001:01:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01
[   24.010123] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0040,subsystem-vendor=168c,subsystem-device=0002 from ath10k/QCA99X0/hw2.0/board-2.bin
[   24.019222] ath10k_pci 0001:01:00.0: board_file api 1 bmi_id N/A crc32 7e56fd07
[   25.201613] ath10k_pci 0001:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1
[   25.269148] ath: EEPROM regdomain: 0x0
[   25.269175] ath: EEPROM indicates default country code should be used
[   25.269192] ath: doing EEPROM country->regdmn map search
[   25.269218] ath: country maps to regdmn code: 0x3a
[   25.269237] ath: Country alpha2 being used: US
[   25.269255] ath: Regpair used: 0x3a
[   25.281459] ip_tables: (C) 2000-2006 Netfilter Core Team
[   25.293187] nf_conntrack version 0.5.0 (7512 buckets, 30048 max)
[   25.415299] xt_time: kernel timezone is -0000
[   25.420244] PPP generic driver version 2.4.2
[   25.421624] NET: Registered protocol family 24
[   28.489122] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   28.489174] jffs2_build_filesystem(): unlocking the mtd device... done.
[   28.501100] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   28.928899] device eth1 entered promiscuous mode
[   28.931623] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   30.908294] ipq806x-gmac-dwmac 37400000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
[   30.908360] br-lan: port 1(eth1) entered forwarding state
[   30.916184] br-lan: port 1(eth1) entered forwarding state
[   30.921717] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   30.958396] ipq806x-gmac-dwmac 37200000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   32.908286] br-lan: port 1(eth1) entered forwarding state
[  335.883290] done.
[  335.883329] jffs2: notice: (691) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

Thanks

@blogic
Copy link
Contributor

blogic commented Nov 8, 2016

looks good, let me know when its ready

@dissent1
Copy link
Contributor Author

dissent1 commented Nov 8, 2016

@heinzek could you please test if spi pins update fixes reboot issue and issue with saving settings during update?

@heinzek
Copy link
Contributor

heinzek commented Nov 8, 2016

@dissent1 I tested Your commits and reboot issue still exist. Issue with saving settings work OK, but first boot after restart takes ~450 sec, after this wifi not starting. After reboot router boot in 30 sec and wifi work OK with saved settings.

ps. Can You check why LED wan red ( gpio 26) not work?
same issue on button wifi ( gpio 49) and button ledgnr (gpio16). Button reset (64) and wps (65) not working on kernel 3.18, but is fixed when kernel is changed to 4.4

Thanks

@dissent1
Copy link
Contributor Author

dissent1 commented Nov 9, 2016

So now at least it saves settings? Have you tried the current commit? I had typo in previous version. Have you tried sysupgrading from version with this commit to version with this commit? Or from your version to version with this commit?
Do you really need kernel 3.18?

@dissent1
Copy link
Contributor Author

dissent1 commented Nov 9, 2016

@heinzek try this patch on top of this pull request dissent1@5eaef88

@mkresin
Copy link
Contributor

mkresin commented Nov 9, 2016

Regarding the reboot issue, could it be that you're are facing the spi flash chip reboot bug that is addressed with the commit "ramips: fix reboot hang with 32MB spi flash" in #464.

If yes, could any of you give me a hint which flash chip is used for the Archer C2600 v1.0 and which one for the Archer C2600 v1.1. Might be possible that it is already fixed in later kernel versions and we just need to backport a patch.

@dissent1
Copy link
Contributor Author

dissent1 commented Nov 9, 2016

@mkresin v1.0 - s25fl256s1, v1.1 - mx25u25635f.
In conjunction with inconsistent pin layout there's absent compatibility for mx chip, might it be the reason it is not getting initialized correctly enough?

@dissent1
Copy link
Contributor Author

dissent1 commented Nov 9, 2016

I've updated the commit and also added "jedec,spi-nor" compatibility in accordance to the driver

@dissent1
Copy link
Contributor Author

dissent1 commented Nov 9, 2016

@heinzek fixed wifi button and added red wan led, that you can assign to what you want.

I have no idea how to make switch button to do something. I think I saw @mkresin posting somewhere according script?

@mkresin
Copy link
Contributor

mkresin commented Nov 9, 2016

In conjunction with inconsistent pin layout there's absent compatibility for mx chip, might it be the reason it is not getting initialized correctly enough?

Well I don't see an initialisation problem here. It's just a hang of the SPI chip on shutdown/reboot. Properly because of missing workaround for a MX25(U/L)25635 quirk.

For reference, the Newifi D1 has a MX25L25635. Seams to me the spi chips are near to identical and @heinzek should give the patch in #464 a try and reply at #464 if the issue for the Archer C2600 v1.1 is fixed as well.

@@ -124,7 +139,7 @@
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;

flash: m25p80@0 {
compatible = "s25fl256s1";
compatible = "s25fl256s1", "mx25u25635f", "jedec,spi-nor";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only compatible = "jedec,spi-nor"; here. Everything else is either unsupported or only available due to backward compatibility.

Check the comments of the source file for details: http://lxr.free-electrons.com/source/drivers/mtd/devices/m25p80.c?v=4.4#L246

@@ -148,7 +194,7 @@
cs-gpios = <&qcom_pinmux 20 0>;

flash: m25p80@0 {
compatible = "s25fl512s";
compatible = "s25fl512s", "jedec,spi-nor";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only compatible = "jedec,spi-nor"; here for the same reasons explained above.

@dissent1
Copy link
Contributor Author

@heinzek do you really need pins 23 and 25 exported? According to c2600 gpl it's not for USB use.

@heinzek
Copy link
Contributor

heinzek commented Nov 10, 2016

@dissent1 I compile firmware with Your latest patches and reboot still not work.
wifi button - OK. Wan red not working.
dmesg:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.30 (hyniu@o2.pl) (gcc version 5.4.0 (LEDE GCC 5.4.0 r2098+1) ) #0 SMP Tue Nov 8 13:25:07 2016
[    0.000000] CPU: ARMv7 Processor [512f04d0] revision 0 (ARMv7), cr=10c5787d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] Machine model: TP-Link Archer C2600
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 122880
[    0.000000] free_area_init_node: node 0, pgdat c07bf380, node_mem_map ddc39000
[    0.000000]   Normal zone: 960 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 122880 pages, LIFO batch:31
[    0.000000] PERCPU: Embedded 11 pages/cpu @ddc0f000 s13824 r8192 d23040 u45056
[    0.000000] pcpu-alloc: s13824 r8192 d23040 u45056 alloc=11*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 121920
[    0.000000] Kernel command line:
[    0.000000] Bootloader command line (ignored): console=ttyHSL1,115200n8 root=mtd:rootfs rootfstype=squashfs
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 480756K/491520K available (4105K kernel code, 239K rwdata, 1504K rodata, 220K init, 222K bss, 10764K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xde800000 - 0xff800000   ( 528 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xde000000   ( 480 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc0782894   (5611 kB)
[    0.000000]       .init : 0xc0783000 - 0xc07ba000   ( 220 kB)
[    0.000000]       .data : 0xc07ba000 - 0xc07f5db0   ( 240 kB)
[    0.000000]        .bss : 0xc07f8000 - 0xc082fb74   ( 223 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: dg_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 305801671480 ns
[    0.000008] sched_clock: 32 bits at 6MHz, resolution 160ns, wraps every 343597383600ns
[    0.000021] Switching to timer-based delay loop, resolution 160ns
[    0.000215] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS (lpj=62500)
[    0.000240] pid_max: default: 32768 minimum: 301
[    0.000337] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000353] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000937] CPU: Testing write buffer coherency: ok
[    0.001278] Setting up static identity map for 0x42208280 - 0x422082d8
[    0.004301] Brought up 2 CPUs
[    0.004319] SMP: Total of 2 processors activated (25.00 BogoMIPS).
[    0.004329] CPU: All CPU(s) started in SVC mode.
[    0.012509] VFP support v0.3: implementor 51 architecture 64 part 4d variant 2 rev 0
[    0.012751] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.012890] pinctrl core: initialized pinctrl subsystem
[    0.014250] NET: Registered protocol family 16
[    0.014514] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.041419] cpuidle: using governor ladder
[    0.072436] cpuidle: using governor menu
[    0.083843] gpiochip_add: registered GPIOs 0 to 68 on device: 800000.pinmux
[    0.083869] GPIO chip 800000.pinmux: created GPIO range 0->68 ==> 800000.pinmux PIN 0->68
[    0.085355] qcom_rpm 108000.rpm: RPM firmware 3.0.16777342
[    0.096257] qcom-clk-rpm 108000.rpm:clock-controller: Error registering RPM Clock driver (-17)
[    0.096287] qcom-clk-rpm: probe of 108000.rpm:clock-controller failed with error -17
[    0.126613] pps_core: LinuxPPS API ver. 1 registered
[    0.126628] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.126664] PTP clock support registered
[    0.127826] clocksource: Switched to clocksource dg_timer
[    0.129037] NET: Registered protocol family 2
[    0.129521] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.129562] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.129614] TCP: Hash tables configured (established 4096 bind 4096)
[    0.129660] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.129683] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.129871] NET: Registered protocol family 1
[    0.129931] PCI: CLS 0 bytes, default 64
[    0.131195] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.131300] No memory allocated for crashlog
[    0.137925] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.137947] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.140408] io scheduler noop registered
[    0.140432] io scheduler deadline registered (default)
[    0.141045] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio_export/usb1_power[0]' - status (0)
[    0.141172] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio_export/usb2_power[0]' - status (0)
[    0.141272] gpio-export gpio_export: 2 gpio(s) exported
[    0.141791] qcom-pcie 1b500000.pci: GPIO lookup for consumer perst
[    0.141808] qcom-pcie 1b500000.pci: using device tree for GPIO lookup
[    0.141829] of_get_named_gpiod_flags: parsed 'perst-gpios' property of node '/soc/pci@1b500000[0]' - status (0)
[    0.141914] 1b500000.pci supply vdda not found, using dummy regulator
[    0.142004] 1b500000.pci supply vdda_phy not found, using dummy regulator
[    0.142083] 1b500000.pci supply vdda_refclk not found, using dummy regulator
[    0.142500] PCI host bridge /soc/pci@1b500000 ranges:
[    0.142536]    IO 0x0fe00000..0x0fefffff -> 0x0fe00000
[    0.142559]   MEM 0x08000000..0x0fdfffff -> 0x08000000
[    0.175804] qcom-pcie 1b500000.pci: PCI host bridge to bus 0000:00
[    0.175825] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.175844] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0xfe00000-0xfefffff])
[    0.175860] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fdfffff]
[    0.175875] pci_bus 0000:00: scanning bus
[    0.175919] pci 0000:00:00.0: [17cb:0101] type 01 class 0x060400
[    0.176022] pci 0000:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
[    0.176075] pci 0000:00:00.0: supports D1
[    0.176090] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.176107] pci 0000:00:00.0: PME# disabled
[    0.176331] pci_bus 0000:00: fixups for bus
[    0.176355] PCI: bus0: Fast back to back transfers disabled
[    0.176373] pci 0000:00:00.0: scanning [bus 01-01] behind bridge, pass 0
[    0.176515] pci_bus 0000:01: scanning bus
[    0.176659] pci 0000:01:00.0: [168c:0040] type 00 class 0x028000
[    0.176975] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.177341] pci 0000:01:00.0: calling pci_fixup_ide_bases+0x0/0x44
[    0.177720] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.177758] pci 0000:01:00.0: PME# disabled
[    0.178121] pci_bus 0000:01: fixups for bus
[    0.178181] PCI: bus1: Fast back to back transfers disabled
[    0.178195] pci_bus 0000:01: bus scan returning with max=01
[    0.178228] pci 0000:00:00.0: scanning [bus 01-01] behind bridge, pass 1
[    0.178249] pci_bus 0000:00: bus scan returning with max=01
[    0.178319] pci 0000:00:00.0: fixup irq: got 132
[    0.178332] pci 0000:00:00.0: assigning IRQ 132
[    0.178394] pci 0000:01:00.0: fixup irq: got 132
[    0.178407] pci 0000:01:00.0: assigning IRQ 132
[    0.178468] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x081fffff]
[    0.178489] pci 0000:01:00.0: BAR 0: assigned [mem 0x08000000-0x081fffff 64bit]
[    0.178592] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.178613] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x081fffff]
[    0.178951] aer 0000:00:00.0:pcie02: service driver aer loaded
[    0.179195] qcom-pcie 1b700000.pci: GPIO lookup for consumer perst
[    0.179209] qcom-pcie 1b700000.pci: using device tree for GPIO lookup
[    0.179230] of_get_named_gpiod_flags: parsed 'perst-gpios' property of node '/soc/pci@1b700000[0]' - status (0)
[    0.179294] 1b700000.pci supply vdda not found, using dummy regulator
[    0.179370] 1b700000.pci supply vdda_phy not found, using dummy regulator
[    0.179450] 1b700000.pci supply vdda_refclk not found, using dummy regulator
[    0.179841] PCI host bridge /soc/pci@1b700000 ranges:
[    0.179871]    IO 0x31e00000..0x31efffff -> 0x31e00000
[    0.179890]   MEM 0x2e000000..0x31dfffff -> 0x2e000000
[    0.209231] qcom-pcie 1b700000.pci: PCI host bridge to bus 0001:00
[    0.209249] pci_bus 0001:00: root bus resource [bus 00-ff]
[    0.209263] pci_bus 0001:00: root bus resource [mem 0x2e000000-0x31dfffff]
[    0.209276] pci_bus 0001:00: scanning bus
[    0.209314] pci 0001:00:00.0: [17cb:0101] type 01 class 0x060400
[    0.209399] pci 0001:00:00.0: calling pci_fixup_ide_bases+0x0/0x44
[    0.209444] pci 0001:00:00.0: supports D1
[    0.209456] pci 0001:00:00.0: PME# supported from D0 D1 D3hot
[    0.209472] pci 0001:00:00.0: PME# disabled
[    0.209684] pci_bus 0001:00: fixups for bus
[    0.209704] PCI: bus0: Fast back to back transfers disabled
[    0.209720] pci 0001:00:00.0: scanning [bus 01-01] behind bridge, pass 0
[    0.209844] pci_bus 0001:01: scanning bus
[    0.209988] pci 0001:01:00.0: [168c:0040] type 00 class 0x028000
[    0.210300] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.210663] pci 0001:01:00.0: calling pci_fixup_ide_bases+0x0/0x44
[    0.211041] pci 0001:01:00.0: PME# supported from D0 D3hot D3cold
[    0.211078] pci 0001:01:00.0: PME# disabled
[    0.211368] pci_bus 0001:01: fixups for bus
[    0.211429] PCI: bus1: Fast back to back transfers disabled
[    0.211442] pci_bus 0001:01: bus scan returning with max=01
[    0.211461] pci 0001:00:00.0: scanning [bus 01-01] behind bridge, pass 1
[    0.211481] pci_bus 0001:00: bus scan returning with max=01
[    0.211523] pcieport 0000:00:00.0: fixup irq: got 132
[    0.211536] pcieport 0000:00:00.0: assigning IRQ 132
[    0.211596] pci 0000:01:00.0: fixup irq: got 132
[    0.211609] pci 0000:01:00.0: assigning IRQ 132
[    0.211672] pci 0001:00:00.0: fixup irq: got 165
[    0.211685] pci 0001:00:00.0: assigning IRQ 165
[    0.211742] pci 0001:01:00.0: fixup irq: got 165
[    0.211755] pci 0001:01:00.0: assigning IRQ 165
[    0.211806] pci 0001:00:00.0: BAR 8: assigned [mem 0x2e000000-0x2e1fffff]
[    0.211826] pci 0001:01:00.0: BAR 0: assigned [mem 0x2e000000-0x2e1fffff 64bit]
[    0.211926] pci 0001:00:00.0: PCI bridge to [bus 01]
[    0.211944] pci 0001:00:00.0:   bridge window [mem 0x2e000000-0x2e1fffff]
[    0.212257] aer 0001:00:00.0:pcie02: service driver aer loaded
[    0.214429] gsbi 16300000.gsbi: GSBI port protocol: 6 crci: 0
[    0.215473] gsbi 1a200000.gsbi: GSBI port protocol: 3 crci: 0
[    0.216491] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.217237] msm_serial 16340000.serial: msm_serial: detected port #0
[    0.217340] msm_serial 16340000.serial: uartclk = 1843200
[    0.217394] 16340000.serial: ttyMSM0 at MMIO 0x16340000 (irq = 166, base_baud = 115200) is a MSM
[    0.217432] msm_serial: console setup on port #0
[    0.879834] console [ttyMSM0] enabled
[    0.884531] msm_serial: driver initialized
[    0.894799] loop: module loaded
[    0.896047] spi_qup 1a280000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.896833] of_get_named_gpiod_flags: parsed 'cs-gpios' property of node '/soc/gsbi@1a200000/spi@1a280000[0]' - status (0)
[    0.898136] m25p80 spi32766.0: mx25u25635f (32768 Kbytes)
[    0.904218] 25 ofpart partitions found on MTD device spi32766.0
[    0.909499] Creating 25 MTD partitions on "spi32766.0":
[    0.915152] 0x000000000000-0x000000020000 : "SBL1"
[    0.921438] 0x000000020000-0x000000040000 : "MIBIB"
[    0.926017] 0x000000040000-0x000000060000 : "SBL2"
[    0.930996] 0x000000060000-0x000000090000 : "SBL3"
[    0.935786] 0x000000090000-0x0000000a0000 : "DDRCONFIG"
[    0.940625] 0x0000000a0000-0x0000000b0000 : "SSD"
[    0.945702] 0x0000000b0000-0x0000000e0000 : "TZ"
[    0.950611] 0x0000000e0000-0x000000100000 : "RPM"
[    0.955322] 0x000000100000-0x000000170000 : "fs-uboot"
[    0.959894] 0x000000170000-0x0000001b0000 : "uboot-env"
[    0.964849] 0x0000001b0000-0x0000001f0000 : "radio"
[    0.970043] 0x0000001f0000-0x0000003f0000 : "os-image"
[    0.974811] 0x0000003f0000-0x000001ef0000 : "rootfs"
[    0.979983] mtd: device 12 (rootfs) set to be root filesystem
[    0.984459] 1 squashfs-split partitions found on MTD device rootfs
[    0.989973] 0x0000006f0000-0x000001ef0000 : "rootfs_data"
[    0.996801] 0x000001ef0000-0x000001ef0200 : "default-mac"
[    1.002338] 0x000001ef0200-0x000001ef0400 : "pin"
[    1.007656] 0x000001ef0400-0x000001f00000 : "product-info"
[    1.012409] 0x000001f00000-0x000001f10000 : "partition-table"
[    1.017720] 0x000001f10000-0x000001f20000 : "soft-version"
[    1.023614] 0x000001f20000-0x000001f30000 : "support-list"
[    1.028988] 0x000001f30000-0x000001f40000 : "profile"
[    1.034340] 0x000001f40000-0x000001f50000 : "default-config"
[    1.039877] 0x000001f50000-0x000001f90000 : "user-config"
[    1.045463] 0x000001f90000-0x000001fd0000 : "qos-db"
[    1.050837] 0x000001fd0000-0x000001fe0000 : "usb-config"
[    1.055772] 0x000001fe0000-0x000002000000 : "log"
[    1.061768] libphy: Fixed MDIO Bus: probed
[    1.064864] of_get_named_gpiod_flags: parsed 'gpios' property of node '/soc/mdio[0]' - status (0)
[    1.064884] of_get_named_gpiod_flags: parsed 'gpios' property of node '/soc/mdio[1]' - status (0)
[    1.064900] of_get_named_gpiod_flags: can't parse 'gpios' property of node '/soc/mdio[2]'
[    1.065016] libphy: GPIO Bitbanged MDIO: probed
[    1.090429] switch0: Atheros AR8337 rev. 2 switch registered on gpio-0
[    1.321805] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/soc/ethernet@37200000/fixed-link[0]'
[    1.322362] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    1.322384]  Ring mode enabled
[    1.326383]  DMA HW capability register supported
[    1.329429]  Enhanced/Alternate descriptors
[    1.334108]  Enabled extended descriptors
[    1.338170]  RX Checksum Offload Engine supported (type 2)
[    1.342270]  TX Checksum insertion supported
[    1.347651]  Wake-Up On Lan supported
[    1.352164]  Enable RX Mitigation via HW Watchdog Timer
[    1.356564] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/soc/ethernet@37400000/fixed-link[0]'
[    1.357018] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    1.360770]  Ring mode enabled
[    1.365879]  DMA HW capability register supported
[    1.368909]  Enhanced/Alternate descriptors
[    1.373604]  Enabled extended descriptors
[    1.377598]  RX Checksum Offload Engine supported (type 2)
[    1.381840]  TX Checksum insertion supported
[    1.387147]  Wake-Up On Lan supported
[    1.391651]  Enable RX Mitigation via HW Watchdog Timer
[    1.395762] i2c /dev entries driver
[    1.401269] Speed bin: 0
[    1.403639] PVS bin: 1
[    1.406813] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    1.408713] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    1.415932] sdhci: Secure Digital Host Controller Interface driver
[    1.423171] sdhci: Copyright(c) Pierre Ossman
[    1.429436] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.435542] L2 @ QSB rate. Forcing new rate.
[    1.439691] L2 @ 384000 KHz
[    1.443866] CPU0 @ 800000 KHz
[    1.446263] CPU1 @ QSB rate. Forcing new rate.
[    1.449552] CPU1 @ 384000 KHz
[    1.455263] NET: Registered protocol family 10
[    1.457962] NET: Registered protocol family 17
[    1.461278] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.465835] 8021q: 802.1Q VLAN Support v1.8
[    1.478463] Registering SWP/SWPB emulation handler
[    1.484231] cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:0, -19
[    1.487684] cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table for cpu:1, -19
[    1.495738] hctosys: unable to open rtc device (rtc0)
[    1.516576] VFS: Mounted root (squashfs filesystem) readonly on device 31:12.
[    1.516760] Freeing unused kernel memory: 220K (c0783000 - c07ba000)
[    1.798323] random: nonblocking pool is initialized
[    3.133874] init: Console is alive
[    3.134016] init: - watchdog -
[    4.933785] usbcore: registered new interface driver usbfs
[    4.933879] usbcore: registered new interface driver hub
[    4.938318] usbcore: registered new device driver usb
[    4.944481] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/wifi[0]' - status (0)
[    4.944496] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/reset[0]' - status (0)
[    4.944509] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/wps[0]' - status (0)
[    4.944521] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/ledgeneral[0]' - status (0)
[    4.947172] SCSI subsystem initialized
[    4.950959] libata version 3.00 loaded.
[    4.953986] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.954384] ehci-platform: EHCI generic platform driver
[    4.961885] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.964916] ohci-platform: OHCI generic platform driver
[    5.480956] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    5.481041] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    5.485590] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[    5.493061] xhci-hcd xhci-hcd.0.auto: irq 168, io mem 0x11000000
[    5.502874] hub 1-0:1.0: USB hub found
[    5.507895] hub 1-0:1.0: 1 port detected
[    5.511978] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    5.515488] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    5.521099] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.529492] hub 2-0:1.0: USB hub found
[    5.536720] hub 2-0:1.0: 1 port detected
[    5.540663] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.544289] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    5.549779] xhci-hcd xhci-hcd.1.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[    5.557158] xhci-hcd xhci-hcd.1.auto: irq 169, io mem 0x10000000
[    5.566320] hub 3-0:1.0: USB hub found
[    5.572149] hub 3-0:1.0: 1 port detected
[    5.575802] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    5.579756] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    5.585069] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.593026] hub 4-0:1.0: USB hub found
[    5.600955] hub 4-0:1.0: 1 port detected
[    5.605214] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/lan[0]' - status (0)
[    5.605305] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/usb4[0]' - status (0)
[    5.605373] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/usb2[0]' - status (0)
[    5.605445] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wps[0]' - status (0)
[    5.605512] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wan_red[0]' - status (0)
[    5.605582] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wan_blue[0]' - status (0)
[    5.605652] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/status[0]' - status (0)
[    5.605724] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/ledgnr[0]' - status (0)
[    5.612136] init: - preinit -
[    8.950249] ipq806x-gmac-dwmac 37400000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
[   10.398830] jffs2: notice: (158) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   10.404361] mount_root: switching to jffs2 overlay
[   10.434128] urandom-seed: Seeding with /etc/urandom.seed
[   10.491521] procd: - early -
[   10.491590] procd: - watchdog -
[   11.142297] procd: - ubus -
[   11.197762] procd: - init -
[   11.416240] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.421590] Loading modules backported from Linux version wt-2016-10-03-1-g6fcb1a6
[   11.421617] Backport generated by backports.git backports-20160324-9-g0e38f5c
[   11.449384] ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142)
[   11.449465] ath10k_pci 0000:01:00.0: enabling bus mastering
[   11.449905] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   11.583121] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
[   11.583166] ath10k_pci 0000:01:00.0: Falling back to user helper
[   11.646198] firmware ath10k!pre-cal-pci-0000:01:00.0.bin: firmware_loading_store: map pages failed
[   12.310322] ath10k_pci 0000:01:00.0: qca99x0 hw2.0 target 0x01000000 chip_id 0x003b01ff sub 168c:0002
[   12.310361] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   12.320433] ath10k_pci 0000:01:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01
[   12.327023] ath10k_pci 0000:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0040,subsystem-vendor=168c,subsystem-device=0002 from ath10k/QCA99X0/hw2.0/board-2.bin
[   12.336191] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 7e56fd07
[   13.518690] ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1
[   13.588964] ath: EEPROM regdomain: 0x0
[   13.588989] ath: EEPROM indicates default country code should be used
[   13.589004] ath: doing EEPROM country->regdmn map search
[   13.589028] ath: country maps to regdmn code: 0x3a
[   13.589046] ath: Country alpha2 being used: US
[   13.589062] ath: Regpair used: 0x3a
[   13.596408] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142)
[   13.596536] ath10k_pci 0001:01:00.0: enabling bus mastering
[   13.597149] ath10k_pci 0001:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   13.729704] ath10k_pci 0001:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0001:01:00.0.bin failed with error -2
[   13.729749] ath10k_pci 0001:01:00.0: Falling back to user helper
[   13.869860] firmware ath10k!pre-cal-pci-0001:01:00.0.bin: firmware_loading_store: map pages failed
[   13.873803] ath10k_pci 0001:01:00.0: qca99x0 hw2.0 target 0x01000000 chip_id 0x003b01ff sub 168c:0002
[   13.877716] ath10k_pci 0001:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   13.888782] ath10k_pci 0001:01:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01
[   13.895377] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0040,subsystem-vendor=168c,subsystem-device=0002 from ath10k/QCA99X0/hw2.0/board-2.bin
[   13.904498] ath10k_pci 0001:01:00.0: board_file api 1 bmi_id N/A crc32 7e56fd07
[   15.086860] ath10k_pci 0001:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1
[   15.148746] ath: EEPROM regdomain: 0x0
[   15.148770] ath: EEPROM indicates default country code should be used
[   15.148787] ath: doing EEPROM country->regdmn map search
[   15.148809] ath: country maps to regdmn code: 0x3a
[   15.148826] ath: Country alpha2 being used: US
[   15.148842] ath: Regpair used: 0x3a
[   15.160000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.170106] nf_conntrack version 0.5.0 (7515 buckets, 30060 max)
[   15.295913] xt_time: kernel timezone is -0000
[   15.301034] PPP generic driver version 2.4.2
[   15.301708] NET: Registered protocol family 24
[   17.530508] device eth1 entered promiscuous mode
[   17.532645] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   19.518224] ipq806x-gmac-dwmac 37400000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
[   19.538364] ipq806x-gmac-dwmac 37200000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   19.761666] ath10k_pci 0001:01:00.0: no channel configured; ignoring frame(s)!
[   19.762867] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[   19.768293] br-lan: port 1(eth1) entered forwarding state
[   19.773651] br-lan: port 1(eth1) entered forwarding state
[   19.779466] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   21.039858] ath10k_pci 0001:01:00.0: no channel configured; ignoring frame(s)!
[   21.063357] ath10k_pci 0000:01:00.0: no channel configured; ignoring frame(s)!
[   21.063555] ath10k_pci 0000:01:00.0: no channel configured; ignoring frame(s)!
[   21.069551] ath10k_pci 0000:01:00.0: no channel configured; ignoring frame(s)!
[   21.076823] ath10k_pci 0000:01:00.0: no channel configured; ignoring frame(s)!
[   21.083950] ath10k_pci 0000:01:00.0: no channel configured; ignoring frame(s)!
[   21.091136] ath10k_pci 0000:01:00.0: no channel configured; ignoring frame(s)!
[   21.098487] ath10k_pci 0000:01:00.0: no channel configured; ignoring frame(s)!
[   21.099052] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   21.102417] device wlan0 entered promiscuous mode
[   21.102510] br-lan: port 2(wlan0) entered forwarding state
[   21.102552] br-lan: port 2(wlan0) entered forwarding state
[   21.129294] device wlan1 entered promiscuous mode
[   21.518987] br-lan: port 2(wlan0) entered disabled state
[   21.519322] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   21.523596] br-lan: port 3(wlan1) entered forwarding state
[   21.529892] br-lan: port 3(wlan1) entered forwarding state
[   21.768166] br-lan: port 1(eth1) entered forwarding state
[   21.860703] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   21.860813] br-lan: port 2(wlan0) entered forwarding state
[   21.866156] br-lan: port 2(wlan0) entered forwarding state
[   23.528236] br-lan: port 3(wlan1) entered forwarding state
[   23.858203] br-lan: port 2(wlan0) entered forwarding state
root@lede:~#

@mkresin

For reference, the Newifi D1 has a MX25L25635. Seams to me the spi chips are near to identical and @heinzek should give the patch in #464 a try and reply at #464 if the issue for the Archer C2600 v1.1 is fixed as well.

I check patch form #464 and this not work ( compile error). Try make other patch based on this: https://patchwork.ozlabs.org/patch/541391 and it work good. Reboot issue is fixed:


--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -265,6 +265,18 @@
    return mtd_device_unregister(&flash->spi_nor.mtd);
 }

+static int m25p_shutdown(struct spi_device *spi)
+{
+   struct m25p *flash = spi_get_drvdata(spi);
+   flash->command[0] = 0x66;  
+   spi_write(flash->spi, flash->command, 1);  
+   flash->command[0] = 0x99;  
+   spi_write(flash->spi, flash->command, 1);
+
+   /* Clean up MTD stuff. */
+   return mtd_device_unregister(&flash->spi_nor.mtd);
+}
+
 /*
  * Do NOT add to this array without reading the following:
  *
@@ -328,6 +340,7 @@
    .id_table   = m25p_ids,
    .probe  = m25p_probe,
    .remove = m25p_remove,
+   .shutdown = m25p_shutdown,

    /* REVISIT: many of these chips have deep power-down modes, which
     * should clearly be entered on suspend() to minimize power use.

@heinzek
Copy link
Contributor

heinzek commented Nov 10, 2016

@dissent1

@heinzek do you really need pins 23 and 25 exported? According to c2600 gpl it's not for USB use.

I export this gpio to control power on each usb port. Now You can easy turn on/off usb devices like as 3g modems.

dissent1 and others added 6 commits November 10, 2016 20:23
The patch lede-project#179 for RPM has initially been made for apq806x board. It has been modified to support ipq806x instead of apq8064.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Fix pci pins drive-strength according to oem sources.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Netgear R7500v2 has 512MB of RAM with 2MB reserved block in the end of memory region.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Updating spi pins configuration in R7800 and C2600 DTs
Adding more usb power pin export and gsbi6 in R7800 DT
Updating and fixing leds

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
@dissent1
Copy link
Contributor Author

I've been doing some tests with RPM cc patch revisions, seems this only version doesn't return errors.
Also fixed spi flash compatibility as @mkresin has requested.

@heinzek red wan is not assigned to anything now, the same for red wan on R7800. I'm not sure that you can assign red led on wan link up and white led on getting ip address or Internet accessibility while turning red led off.
Also check please if lan led turns off for you now when link is down.

@mkresin
Copy link
Contributor

mkresin commented Nov 10, 2016

@dissent1 please don't add the spi patch. it is a submission of a different PR and should not be part of your PR.

Have you considered to close this PR and open a Pull Request if you have something that is not work in progress. I mean what you are doing with the github PR feature isn't what it is made for.

Usually you open a PR if your changes are ready to commit. But instead you are adding constantly new feature to your PR. It might be better to keep the changes just in your repository.

@dissent1
Copy link
Contributor Author

@mkresin I'm sorry for that, I admit that it is not a good practice. At the time I submitted PR it was ready to be merged but then I came across some more stuff. I was not going to add the spi patch because there is discussion on it as I can see :)

These changes are ready if it's OK.

@heinzek
Copy link
Contributor

heinzek commented Nov 10, 2016

@heinzek red wan is not assigned to anything now, the same for red wan on R7800.

I know this, but I try to power on this led using command:
echo 1 > /sys/class/leds/c2600:red:wan/brightness

Also check please if lan led turns off for you now when link is down.

Nope. eth0 and eth1 is allways up because is connected to switch AR8337.

[   19.629279] ipq806x-gmac-dwmac 37400000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
[   19.658519] ipq806x-gmac-dwmac 37200000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

i think You can use:

ucidef_set_led_switch "lan" "lan" "$board:white:lan" "switch0" "0x1e" 
ucidef_set_led_switch "wan" "wan" "$board:white:wan" "switch0" "0x20"

and add to config-4.4: CONFIG_SWCONFIG_LEDS=y

This working, but leds not blinking and you can not see what is the use of WAN / LAN.

@dissent1
Copy link
Contributor Author

@heinzek the less fixup will be in new PR, look @mkresin is angry :)

@blogic this one is ready if everything's ok

@blogic
Copy link
Contributor

blogic commented Nov 16, 2016

merged, Thanks !

@blogic blogic closed this Nov 16, 2016
@hnyman hnyman mentioned this pull request Nov 17, 2016
@mkresin
Copy link
Contributor

mkresin commented Nov 19, 2016

@dissent1 Your watchdog backport causes build errors on ip806x. Because of the error, the snapshots are not updated since 16-Nov-2016.

Would you please have a look at this!

If you're backporting kernel stuff or add kernel patches, compile test with all kernel modules enabled:

make menuconfig

Global build settings  --->
  [*] Select all kernel module packages by default

@dissent1
Copy link
Contributor Author

What's the exact error? I cannot repeat it. It builds fine with that option checked in my tree

@blogic
Copy link
Contributor

blogic commented Nov 19, 2016

http://phase1.builds.lede-project.org/builders/ipq806x%2Fgeneric/builds/275/steps/kmods/logs/stdio

drivers/hwmon/sch56xx-common.c:418:2: error: unknown field 'ref' specified in initializer
.ref = watchdog_ref,
^
drivers/hwmon/sch56xx-common.c:418:10: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.ref = watchdog_ref,
^
drivers/hwmon/sch56xx-common.c:418:10: note: (near initialization for 'watchdog_ops.get_timeleft')
drivers/hwmon/sch56xx-common.c:419:2: error: unknown field 'unref' specified in initializer
.unref = watchdog_unref,
^
drivers/hwmon/sch56xx-common.c:419:12: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.unref = watchdog_unref,
^
drivers/hwmon/sch56xx-common.c:419:12: note: (near initialization for 'watchdog_ops.restart')

@dissent1
Copy link
Contributor Author

Seems there are 3 patches missing, should I provide a new PR or add a commit into this one?

@mkresin
Copy link
Contributor

mkresin commented Nov 19, 2016

19.11.2016 11:31, dissent1:

Seems there are 3 patches missing, should I provide a new PR or add a
commit into this one?

New PR please! this one is closed and no one will look at it.

@dissent1 dissent1 deleted the DTup branch January 31, 2017 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants