Skip to content

mvebu: cortexa9: Add support for Ctera C200-V2 - #4863

Closed
CHKDSK88 wants to merge 2 commits into
openwrt:masterfrom
CHKDSK88:ctera_c200_v2
Closed

CHKDSK88 wants to merge 2 commits into
openwrt:masterfrom
CHKDSK88:ctera_c200_v2

Conversation

@CHKDSK88

@CHKDSK88 CHKDSK88 commented Dec 20, 2021 •

Copy link
Copy Markdown
Contributor

2-Bay NAS - maximum two 3.5" Harddisks

Hardware:

  • SoC: Marvell 88F6707-A1 ARMv7 Processor 1,2GHz (ARMADA 370 SoC)
  • Ram: 1GB (2x Nanya NT5CC512M8DN-D1)
  • NAND Flash: 256MB (ESMT F59L2G81A-25T)
  • Lan: 1x GBE (Marvell 88E1318-NNB2)
  • Storage: 2x SATA HDD 3.5" Slot
  • USB: 2x USB 3.0 port (Renesas uPD720202)
  • Console: Internal J3 connector (1: Vcc, 2: Rx, 3: Tx, 4: GND)
  • LEDs: 13x GPIO controlled
  • Buttons: 2x GPIO controlled

Known issues:

  • Buzzer is unused due lack of proper driver
  • USB1/2 usbport ledtrigger won't work
  • Renesas uPD720202 requires firmware file. It's possible to find
    non-free binary. Please look for 'UPDATE.mem' file and put in into
    '/lib/firmware/renesas_usb_fw.mem' file.

Installation:

  • Apply factory initramfs image via stock web-gui.
  • Do sysupgrade to make installation complete.

Back to stock:

  • OpenWrt rootfs partition use unused space after stock firmware.
  • Full revert is possible.
  • Login via ssh and run: ctera_c200-v2_back_to_factory

Signed-off-by: Pawel Dembicki [email protected]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@chunkeey
Could You help me with figure out why Renesas uPD720202 led triger won't work?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hm, can you copy over the "trigger-sources" from the APM821xx/Netgear WNDR4700 (led-2) and put them into your usb-green node and try again?

From what I remember (it's been a while), the reason why there are four triggers is that the uPD720202 effectively exposes separate ports for ehci (port1)+xhci (port2). So 2 Ports * 2 (independent) Controllers = 4 Triggers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I set 4 triggers, but it won't help. I afraid, that reg addresses in pcie tree could be wrong. I'm not sure how to find it.

@chunkeey chunkeey Dec 23, 2021 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I afraid, that reg addresses in pcie tree could be wrong. I'm not sure how to find it.

hm, there's a quick test.

# cat /sys/class/leds/green:usb/trigger

if it's usbport then the regs are correct (and maybe port0+port1 are from the internal usb - though this wouldn't make sense?!). if not, then yeah.... this was a problem with the WNDR4700 + WNDAP660 too. they have a pcie-switch which resulted in a very strange paths.
I remember adding printk's into the kernel in order to get the correct lookup path (but sadly I no longer remember where exactly).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

addendum:

a lot of the mvebu devices have upstream .dts. If this "looking for the correct regs" doesn't work out, you should posted your .dts to upstream ( Andrew Lunn [email protected], Gregory Clement [email protected], Sebastian Hesselbarth [email protected], [email protected] ) and ask for their input.

@mans0n mans0n added kernel pull request/issue with Linux kernel related changes core packages pull request/issue for core (in-tree) packages target/mvebu pull request/issue for mvebu target labels Dec 20, 2021
Comment thread package/firmware/renesas-usb-firmware/Makefile Outdated
Comment thread target/linux/mvebu/files/arch/arm/boot/dts/armada-370-c200-v2.dts Outdated
Comment thread target/linux/mvebu/files/arch/arm/boot/dts/armada-370-c200-v2.dts Outdated
Comment thread target/linux/mvebu/files/arch/arm/boot/dts/armada-370-c200-v2.dts Outdated
Comment thread package/kernel/linux/modules/usb.mk Outdated
This commit add package with hwmon-nct7802 module.

This driver implements support for the Nuvoton NCT7802Y hardware monitoring
chip. NCT7802Y supports 6 temperature sensors, 5 voltage sensors, and 3 fan
speed sensors.

Signed-off-by: Pawel Dembicki <[email protected]>
2-Bay NAS - maximum two 3.5" Harddisks

Hardware:
  - SoC: Marvell 88F6707-A1 ARMv7 Processor 1,2GHz (ARMADA 370 SoC)
  - Ram: 1GB (2x Nanya NT5CC512M8DN-D1)
  - NAND Flash: 256MB (ESMT F59L2G81A-25T)
  - Lan: 1x GBE (Marvell 88E1318-NNB2)
  - Storage: 2x SATA HDD 3.5" Slot
  - USB: 2x USB 3.0 port (Renesas uPD720202)
  - Console: Internal J3 connector (1: Vcc, 2: Rx, 3: Tx, 4: GND)
  - LEDs: 13x GPIO controlled
  - Buttons: 2x GPIO controlled

Known issues:
  - Buzzer is unused due lack of proper driver
  - USB1/2 usbport ledtrigger won't work
  - Renesas uPD720202 requires firmware file. It's possible to find
    non-free binary. Please look for 'UPDATE.mem' file and put in into
    '/lib/firmware/renesas_usb_fw.mem' file.

Installation:
  - Apply factory initramfs image via stock web-gui.
  - Do sysupgrade to make installation complete.

Back to stock:
  - OpenWrt rootfs partition use unused space after stock firmware.
  - Full revert is possible.
  - Login via ssh and run: ctera_c200-v2_back_to_factory

Signed-off-by: Pawel Dembicki <[email protected]>
/* Renesas uPD720202 */
compatible = "pci1912,0015";
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#address-cells = <1>;
#size-cells = <0>;

(and no ranges;);

Comment thread target/linux/mvebu/files/arch/arm/boot/dts/armada-370-c200-v2.dts
DEVICE_VENDOR := Ctera
DEVICE_MODEL := C200
DEVICE_VARIANT := V2
SUBPAGESIZE :=

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Twice? (it's set in line 36, and this clears it again?)

@chunkeey

Copy link
Copy Markdown
Member

ok, I've added the uci_ definitions for the usb-port. I hope they work. Merged. Thanks!

@chunkeey chunkeey closed this Jan 15, 2022
@CHKDSK88

Copy link
Copy Markdown
Contributor Author

@chunkeey

Thanks for merge. USB triggers work if 01_leds is fixed. Firmware file is required in squashfs for proper driver start. I will prepare manual in wiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core packages pull request/issue for core (in-tree) packages kernel pull request/issue with Linux kernel related changes target/mvebu pull request/issue for mvebu target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants