Skip to content
This repository has been archived by the owner on Dec 29, 2017. It is now read-only.

Commit

Permalink
Update with changes from RFC V2
Browse files Browse the repository at this point in the history
Lots of new changes
* Move sp5100_tco patches to x86
* Enable the LED & GPIO driver within the kernel config
* Remove the Modules for sp5100_tco and gpio-nct5104d
* Add board detection code to gpio-nct5104d (needed as it's in the
kernel config now)
* Minor updates to leds-apu2
* Update build.sh to use latest revision
  • Loading branch information
riptidewave93 committed Oct 24, 2016
1 parent ae7b95d commit ef0e840
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 43 deletions.
2 changes: 1 addition & 1 deletion build.sh
Expand Up @@ -23,7 +23,7 @@ if [ ! -d "$clonedir" ]; then
Msg "Cloning Repo..."
git clone https://github.com/lede-project/source $clonedir
cd $clonedir
git reset --hard 2187f57db6f55d41d68704179d309fbb6199b08e
git reset --hard 920f92265207c8bfb24136c7245e1558cc8337ec
cd - > /dev/null
fi

Expand Down
2 changes: 2 additions & 0 deletions overlay/target/linux/x86/64/config-default
Expand Up @@ -101,6 +101,7 @@ CONFIG_GPIOLIB=y
# CONFIG_GPIO_INTEL_MID is not set
# CONFIG_GPIO_IT87 is not set
# CONFIG_GPIO_LYNXPOINT is not set
CONFIG_GPIO_NCT5104D=y
CONFIG_GPIO_SYSFS=y
CONFIG_HAVE_ACPI_APEI=y
CONFIG_HAVE_ACPI_APEI_NMI=y
Expand Down Expand Up @@ -205,6 +206,7 @@ CONFIG_SATA_AHCI=y
CONFIG_SCSI_VIRTIO=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SMP=y
CONFIG_SP5100_TCO=y
CONFIG_SPARSEMEM=y
CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y
CONFIG_SPARSEMEM_EXTREME=y
Expand Down
7 changes: 3 additions & 4 deletions overlay/target/linux/x86/64/profiles/001-PCEngines.mk
Expand Up @@ -8,10 +8,9 @@
define Profile/APU2
NAME:=PC Engines APU2
PACKAGES:=beep flashrom libsensors lm-sensors usbutils wpad-mini \
kmod-ath9k kmod-ath10k kmod-gpio-button-hotplug kmod-gpio-nct5104d \
kmod-hwmon-core kmod-hwmon-k10temp kmod-leds-gpio kmod-pcspkr \
kmod-sound-core kmod-sp5100_tco kmod-usb-core kmod-usb-ohci \
kmod-usb-serial kmod-usb2 kmod-usb3 \
kmod-ath9k kmod-ath10k kmod-gpio-button-hotplug kmod-hwmon-core \
kmod-hwmon-k10temp kmod-leds-gpio kmod-pcspkr kmod-sound-core \
kmod-usb-core kmod-usb-ohci kmod-usb-serial kmod-usb2 kmod-usb3 \
-kmod-e1000e -kmod-e1000 -kmod-r8169
endef

Expand Down
9 changes: 9 additions & 0 deletions overlay/target/linux/x86/files/drivers/gpio/gpio-nct5104d.c
Expand Up @@ -14,6 +14,8 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/dmi.h>
#include <linux/string.h>

#define DRVNAME "gpio-nct5104d"

Expand Down Expand Up @@ -403,6 +405,13 @@ static int __init nct5104d_gpio_init(void)
{
int err;
struct nct5104d_sio sio;
const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);

/* Make sure we only run on PC Engine APU boards */
if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strncasecmp(board_name, "apu", 3)) {
return -ENODEV;
}

if (nct5104d_find(0x2e, &sio) &&
nct5104d_find(0x4e, &sio))
Expand Down
4 changes: 2 additions & 2 deletions overlay/target/linux/x86/files/drivers/leds/leds-apu2.c
Expand Up @@ -39,7 +39,7 @@
#include <linux/input.h>
#include <linux/gpio_keys.h>

#define DEVNAME "gpio-apu2"
#define DEVNAME "leds-apu2"

#define FCH_ACPI_MMIO_BASE 0xFED80000
#define FCH_GPIO_BASE (FCH_ACPI_MMIO_BASE + 0x1500)
Expand Down Expand Up @@ -328,7 +328,7 @@
const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);

/* Match the device name/model */
if (!board_name || !board_vendor || strcmp(board_vendor, "PC Engines") || strcasecmp(board_name, "apu2")) {
if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strcasecmp(board_name, "apu2")) {
err = -ENODEV;
goto exit;
}
Expand Down
36 changes: 0 additions & 36 deletions overlay/target/linux/x86/modules.mk

This file was deleted.

1 comment on commit ef0e840

@CRCinAU
Copy link

Choose a reason for hiding this comment

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

While I'm still waiting for my APU2 to arrive, is the i2c bus active and detected?

I've been working on some i2c to neopixel code for an arduino so I can control 8 LEDs as status indicators from the APU2 via the i2c bus...

Please sign in to comment.