Commit Graph

69 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Daniel Golle 9f14216a2c oxnas: some improvements for Shuttle KD20
* install kmod-hwmon-drivetemp by default
 * wire up thermal zone
 * fix fan GPIO polarity
 * fix i2c-gpio GPIO_OPEN_DRAIN

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle 5e82e1ed2f oxnas: fix warning in SATA driver
drivers/ata/sata_oxnas.c: In function 'sata_oxnas_port_irq':
drivers/ata/sata_oxnas.c:2126:25: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (ap->qc_active & (1 << ATA_TAG_INTERNAL)) {
                           ^~

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Sungbo Eo 9e129c9d95 oxnas: enable sata on Pogoplug V3/Pro
Pogoplug V3/Pro has an interanl SATA port. To use it, DTS sata node should be
enabled, and kmod-ata-oxnas-sata package needs to be installed.

Fixes: FS#2542

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Sungbo Eo 9559a3304e oxnas: use dt-bindings macros for GPIO
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Daniel Golle f39230e463 oxnas: switch to kernel 5.4 and remove kernel 4.14
Run-tested 5.4 on Shuttle KD20 for some days now, everything seems
fine so far. Let's have snapshot builds based on 5.4.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle 5ea1b1ecd1 oxnas: add 5.4 as testing kernel version
Add 5.4 kernel version as a new testing kernel option.
Run-tested on Shuttle KD20, seems to work just as well as kernel 4.14.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Daniel Golle 74ef848b96 oxnas: also akitio,mycloud uses PCIe apparently
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 0e9b11213e oxnas: enable pcie_phy on boards utilizing PCIe
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 87a81455a1 oxnas: replace oxnas-restart with version to be submitted to upstream
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 35a7f79096 oxnas: use generic filenames for image and DTS
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 8ad0ba3a07 oxnas: move PCIe controller outside of simple-bus
Move PCIe controller outside down to SoC level to avoid resource
mapping problems.
Also add more detailed error handling when mapping registers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle e7aa4c0db7 oxnas: pcie: model shared resource as external pcie-phy driver
Refactor pcie-oxnas to have shared resources in syscon and new pcie-phy
driver. Hopefully this revives PCIe...

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 3bb9dcf446 oxnas: convert pcie to builtin_platform_driver
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 302f7d57a9 oxnas: restart: use register definitions from dt-bindings
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle dcb08049ae oxnas: cleanup and improve pcie driver
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle c1a8054114 oxnas: add SoC restart driver for reboot
Refresh oxnas kernel config while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 42f2e07ba0 oxnas: cloudengines,pogoplug*: enable USB ports
Reported-by: Jörg Fischer <fischer.loepsingen@yahoo.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 6b2874707a oxnas: switch to DTS aliases for LEDs and use generic diag.sh
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle e2fea41ad6 oxnas: fix forgotten MTD partition name
Fixes: 858aebc0ef ("oxnas: unify MTD partition names")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 5fac36d5aa oxnas: switch to kmod-ledtrig-usb-port
Add port handles for both USB 2.0 ports so they can be used as
trigger-source for USB LEDs.
Suggestions for pogoplug and akitio,mycloud devices are welcome.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 858aebc0ef oxnas: unify MTD partition names
Use 'u-boot' and 'u-boot-env' like the majority of OpenWrt targets
does...

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Daniel Golle 994428f395 oxnas: add missing NAND partitions
add kernel and other missing NAND flash partitions to allow booting
using stock loader instead of the 2nd-stage bootloader.
This will ease installation from stock firmware on pogoplugs as well
as stg212 aka. medion nas.

Existing users of OpenWrt on those boards will have to boot initramfs
generated after this commit and subsequently flash first the ubinized
image, then again run initramfs to flash sysupgrade.tar image, and
then restore bootcmd in U-Boot environment back to the original setting
('nboot 60500000 0 440000' or something like that) instead of jumping
into the now no longer used 2nd-stage loader.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years ago
Petr Štetiar 9292822023 oxnas: dts: Unify naming of gpio-led nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Petr Štetiar 4a954e8620 oxnas: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
5 years ago
Daniel Golle b831eb5363 oxnas: kd20: correct memory size to 256MB
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle 9bcc08958b oxnas: add console=ttyS0,115200 argument to bootargs
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Paul Wassi e348ccc4e6 treewide: fix some cosmetic glitches in dts files
- fix single spaces hidden by a tab
- replace indentation with spaces by tabs
- make empty lines empty
- drop trailing whitespace
- drop unnecessary blank lines

Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
6 years ago
Daniel Golle dcc34574ef oxnas: bring in new oxnas target
Reboot the oxnas target based on Linux 4.14 by rebasing our support on
top of the now-existing upstream kernel support.
This commit brings oxnas support to the level of v4.17 having upstream
drivers for Ethernet, Serial and NAND flash.
Botch up OpenWrt's local drivers for EHCI, SATA and PCIe based on the
new platform code and device-tree.
Re-introduce base-files from old oxnas target which works for now but
needs further clean-up towards generic board support.

Functional issues:
 * PCIe won't come up (hence no USB3 on Shuttle KD20)
 * I2C bus of Akitio myCloud device is likely not to work (missing
   debounce support in new pinctrl driver)

Code-style issues:
 * plla/pllb needs further cleanup -- currently their users or writing
   into the syscon regmap after acquireling the clk instead of using
   defined clk_*_*() functions to setup multipliers and dividors.
 * PCIe phy needs its own little driver.
 * SATA driver is a monster and should be split into an mfd having
   a raidctrl regmap, sata controller, sata ports and sata phy.

Tested on MitraStar STG-212 aka. Medion Akoya MD86xxx and Shuttle KD20.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle 17511a7ea8 oxnas: kill old oxnas target
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle 870b7bee44 oxnas: remove some kprintf calls from NAND driver
They were added for debugging and I forgot to remove them.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Daniel Golle a46c9a4038 oxnas: remove support for pre-4.4 kernels from drivers
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Hauke Mehrtens 321aca6661 oxnas: fix syntax in ox820-akitio.dts
This commit introduced a syntax error in ox820-akitio.dts which is
fixed now:
commit 5cde94d9ab
Author: Daniel Golle <daniel@makrotopia.org>
Date:   Sat Sep 24 01:14:53 2016 +0200
    oxnas: backport upstream NAND driver

This caused the folowing error message in the build bot:
Error: arch/arm/boot/dts/ox820-akitio.dts:146.3-147.1 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/ox820-akitio.dtb' failed
make[5]: *** [arch/arm/boot/dts/ox820-akitio.dtb] Error 1

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Daniel Golle 5cde94d9ab oxnas: backport upstream NAND driver
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
Mathias Kresin 2b55c83e68 treewide: dts: use keycode defines from input dt-binding
All compiled device tree files not mentioned are binary identical to the
former ones.

Fix the obvious decimal/hex confusion for the power key of ramips/M2M.dts.

Due to the include of the input binding header, the BTN_* node names in:

  - ramips/GL-MT300A.dts
  - ramips/GL-MT300N.dts
  - ramips/GL-MT750.dts
  - ramips/Timecloud.dts

will be changed by the compiler to the numerical equivalent.

Move the binding include of lantiq boards to the file where they are
used the first time to hint the user where the values do come from.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin 77b807999d treewide: dts: use C style includes
No functional change but allows me to use one script to compile all
device tree source files.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Daniel Golle a810e7789a oxnas: add mem=128M to stg-212 built-in cmdline for legacy u-boot
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 years ago
Daniel Golle c773a2c46e oxnas: kd20: generate image compatible with stock firmware
* adjust MTD partitions to match vendor's scheme
 * generate *factory.tar.gz image compatible with stock web-if
   firmware upgrade interface

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 years ago
Daniel Golle c5ec5e1f7f oxnas: revert to kernel 4.1
A bug resulting in the NAND not being detected by newer kernels has
kept me sleepless for months and yet I wasn't able to discover the
cause.
Bring back patches and files for 4.1 until this has been resolved.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 years ago
Daniel Golle 118b5ae7b2 oxnas: drop compatibility with old kernels from mach-ox820
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 years ago
Daniel Golle 97ce23c347 oxnas: drop compatibility with old kernels from pinctrl
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 years ago
Daniel Golle f90f379a7f oxnas: drop compatibility with old kernels from irq-rps
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 years ago
Daniel Golle 53a9809080 oxnas: drop compatibility with old kernels from dwmac-oxnas
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 years ago
Luka Perkov 9f4e0c7751 oxnas: add missing semicolon
A missing semicolon in the gpio-keys-polled section of ox820-akitio.dts
caused the build to break. Add it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 49219
8 years ago
Hauke Mehrtens 012da658a4 oxnas: add support for Akitio MyCloud mini
Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 49197
8 years ago
John Crispin e9db6eb8b2 oxnas: sync cpu-hotplug with mach-realview
Make mach-oxnas/hotplug.c look more similar to mach-realview/hotplug.c,
just cosmetics and maintainability concerns, no functional changes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 49044
8 years ago
John Crispin b64f159bc8 oxnas: add spinlock in pinctrl driver
Try to address a race-condition in pinctrl-oxnas.c

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 49043
8 years ago
John Crispin daf7ab04ba oxnas: also reset GPIO B registers on boot
Clear both, SYS_CTRL_*_SEL and SEC_CTRL_*_SEL on boot instead of
writing to SYS_CTRL_*_SEL twice which looks like a copy-paste error.
Thanks to anonymous to bring this up in #21892!

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 49042
8 years ago
John Crispin 300be15e84 oxnas: complete NAND driver clean-up
some bit rot was accidentally left-out in r48986, remove it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 48997
8 years ago
John Crispin 61f27ca3e4 oxnas: clean-up NAND driver to fix probing issue
A re-write of the driver based on xway_nand.c and constants as
well as the cmd_ctrl() function from the original oxnas_nand.c
resulted in a extremely similar looking file (see diffsize),
and fixes the issue of NAND not being detected on newer kernels.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 48986
8 years ago
Felix Fietkau cee6c07cf3 oxnas: prepare platform and drivers for Linux 4.4
Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 48338
8 years ago