|
@@ -0,0 +1,1036 @@
|
|
|
|
+diff --git a/package/mraa/0001-gpio-Fix-JS-binding-regarding-interrupt-injections.patch b/package/mraa/0001-gpio-Fix-JS-binding-regarding-interrupt-injections.patch
|
|
|
|
+new file mode 100644
|
|
|
|
+index 0000000000..d8dc029b62
|
|
|
|
+--- /dev/null
|
|
|
|
++++ b/package/mraa/0001-gpio-Fix-JS-binding-regarding-interrupt-injections.patch
|
|
|
|
+@@ -0,0 +1,135 @@
|
|
|
|
++From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
++From: Jan Kiszka <jan.kiszka@siemens.com>
|
|
|
|
++Date: Mon, 5 Dec 2022 11:45:15 +0100
|
|
|
|
++Subject: [PATCH] gpio: Fix JS binding regarding interrupt injections
|
|
|
|
++
|
|
|
|
++According to [1] and based on stress tests, it is not correct to call
|
|
|
|
++uv_queue_work outside of the loop thread. We rather need to use the
|
|
|
|
++async API of libuv. That even simplifies things.
|
|
|
|
++
|
|
|
|
++Resolves "uv__queue_done: Assertion `uv__has_active_reqs(req->loop)' failed"
|
|
|
|
++errors that were easy to trigger by multiple DIs being used in parallel.
|
|
|
|
++See also [2].
|
|
|
|
++
|
|
|
|
++[1] https://github.com/libuv/libuv/discussions/3847
|
|
|
|
++[2] https://github.com/siemens/meta-iot2050/issues/386
|
|
|
|
++
|
|
|
|
++Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
|
|
|
|
++---
|
|
|
|
++ api/mraa/gpio.hpp | 37 +++++++++++++++++++++----------------
|
|
|
|
++ 1 file changed, 21 insertions(+), 16 deletions(-)
|
|
|
|
++
|
|
|
|
++diff --git a/api/mraa/gpio.hpp b/api/mraa/gpio.hpp
|
|
|
|
++index 8fc0881..c41d527 100644
|
|
|
|
++--- a/api/mraa/gpio.hpp
|
|
|
|
+++++ b/api/mraa/gpio.hpp
|
|
|
|
++@@ -31,10 +31,10 @@
|
|
|
|
++ #include <stdexcept>
|
|
|
|
++
|
|
|
|
++ #if defined(SWIGJAVASCRIPT)
|
|
|
|
++-#if NODE_MODULE_VERSION >= 0x000D
|
|
|
|
++ #include <uv.h>
|
|
|
|
++ #endif
|
|
|
|
++-#endif
|
|
|
|
+++
|
|
|
|
+++#define container_of(ptr, type, member) ((type*) ((char*) (ptr) - offsetof(type, member)))
|
|
|
|
++
|
|
|
|
++ namespace mraa
|
|
|
|
++ {
|
|
|
|
++@@ -124,6 +124,10 @@ class Gpio
|
|
|
|
++ if (!owner) {
|
|
|
|
++ mraa_gpio_owner(m_gpio, 0);
|
|
|
|
++ }
|
|
|
|
+++
|
|
|
|
+++#if defined(SWIGJAVASCRIPT)
|
|
|
|
+++ uv_async_init(uv_default_loop(), &m_async, v8isr);
|
|
|
|
+++#endif
|
|
|
|
++ }
|
|
|
|
++ /**
|
|
|
|
++ * Gpio Constructor, takes a pointer to the GPIO context and initialises
|
|
|
|
++@@ -137,6 +141,9 @@ class Gpio
|
|
|
|
++ if (m_gpio == NULL) {
|
|
|
|
++ throw std::invalid_argument("Invalid GPIO context");
|
|
|
|
++ }
|
|
|
|
+++#if defined(SWIGJAVASCRIPT)
|
|
|
|
+++ uv_async_init(uv_default_loop(), &m_async, v8isr);
|
|
|
|
+++#endif
|
|
|
|
++ }
|
|
|
|
++ /**
|
|
|
|
++ * Gpio object destructor, this will only unexport the gpio if we where
|
|
|
|
++@@ -146,6 +153,9 @@ class Gpio
|
|
|
|
++ {
|
|
|
|
++ if (m_gpio != NULL) {
|
|
|
|
++ mraa_gpio_close(m_gpio);
|
|
|
|
+++#if defined(SWIGJAVASCRIPT)
|
|
|
|
+++ uv_close((uv_handle_t*) &m_async, NULL);
|
|
|
|
+++#endif
|
|
|
|
++ }
|
|
|
|
++ }
|
|
|
|
++ /**
|
|
|
|
++@@ -156,6 +166,9 @@ class Gpio
|
|
|
|
++ {
|
|
|
|
++ mraa_gpio_close(m_gpio);
|
|
|
|
++ m_gpio = NULL;
|
|
|
|
+++#if defined(SWIGJAVASCRIPT)
|
|
|
|
+++ uv_close((uv_handle_t*) &m_async, NULL);
|
|
|
|
+++#endif
|
|
|
|
++ }
|
|
|
|
++ /**
|
|
|
|
++ * Set the edge mode for ISR
|
|
|
|
++@@ -176,12 +189,12 @@ class Gpio
|
|
|
|
++ }
|
|
|
|
++ #elif defined(SWIGJAVASCRIPT)
|
|
|
|
++ static void
|
|
|
|
++- v8isr(uv_work_t* req, int status)
|
|
|
|
+++ v8isr(uv_async_t* async)
|
|
|
|
++ {
|
|
|
|
++ #if NODE_MODULE_VERSION >= 0x000D
|
|
|
|
++ v8::HandleScope scope(v8::Isolate::GetCurrent());
|
|
|
|
++ #endif
|
|
|
|
++- mraa::Gpio* This = (mraa::Gpio*) req->data;
|
|
|
|
+++ mraa::Gpio* This = container_of(async, mraa::Gpio, m_async);
|
|
|
|
++ int argc = 1;
|
|
|
|
++ v8::Local<v8::Value> argv[] = { SWIGV8_INTEGER_NEW(-1) };
|
|
|
|
++ #if NODE_MODULE_VERSION >= 0x000D
|
|
|
|
++@@ -194,21 +207,12 @@ class Gpio
|
|
|
|
++ #else
|
|
|
|
++ This->m_v8isr->Call(SWIGV8_CURRENT_CONTEXT()->Global(), argc, argv);
|
|
|
|
++ #endif
|
|
|
|
++- delete req;
|
|
|
|
++- }
|
|
|
|
++-
|
|
|
|
++- static void
|
|
|
|
++- nop(uv_work_t* req)
|
|
|
|
++- {
|
|
|
|
++- // Do nothing.
|
|
|
|
++ }
|
|
|
|
++
|
|
|
|
++ static void
|
|
|
|
++- uvwork(void* ctx)
|
|
|
|
+++ trigger_async(void* async)
|
|
|
|
++ {
|
|
|
|
++- uv_work_t* req = new uv_work_t;
|
|
|
|
++- req->data = ctx;
|
|
|
|
++- uv_queue_work(uv_default_loop(), req, nop, v8isr);
|
|
|
|
+++ uv_async_send((uv_async_t*) async);
|
|
|
|
++ }
|
|
|
|
++
|
|
|
|
++ Result
|
|
|
|
++@@ -219,7 +223,7 @@ class Gpio
|
|
|
|
++ #else
|
|
|
|
++ m_v8isr = v8::Persistent<v8::Function>::New(func);
|
|
|
|
++ #endif
|
|
|
|
++- return (Result) mraa_gpio_isr(m_gpio, (mraa_gpio_edge_t) mode, &uvwork, this);
|
|
|
|
+++ return (Result) mraa_gpio_isr(m_gpio, (mraa_gpio_edge_t) mode, trigger_async, &m_async);
|
|
|
|
++ }
|
|
|
|
++ #elif defined(SWIGJAVA) || defined(JAVACALLBACK)
|
|
|
|
++ Result
|
|
|
|
++@@ -376,6 +380,7 @@ class Gpio
|
|
|
|
++ private:
|
|
|
|
++ mraa_gpio_context m_gpio;
|
|
|
|
++ #if defined(SWIGJAVASCRIPT)
|
|
|
|
+++ uv_async_t m_async;
|
|
|
|
++ v8::Persistent<v8::Function> m_v8isr;
|
|
|
|
++ #endif
|
|
|
|
++ };
|
|
|
|
+diff --git a/package/mraa/0001-include-Declare-gVERSION-global-as-extern.patch b/package/mraa/0001-include-Declare-gVERSION-global-as-extern.patch
|
|
|
|
+deleted file mode 100644
|
|
|
|
+index 110c020a62..0000000000
|
|
|
|
+--- a/package/mraa/0001-include-Declare-gVERSION-global-as-extern.patch
|
|
|
|
++++ /dev/null
|
|
|
|
+@@ -1,30 +0,0 @@
|
|
|
|
+-From aaa0a5cd4e401bde4fb3691dd4e6c70a5c61e031 Mon Sep 17 00:00:00 2001
|
|
|
|
+-From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
|
|
|
+-Date: Mon, 13 Apr 2020 20:12:11 +0200
|
|
|
|
+-Subject: [PATCH] include: Declare gVERSION global as 'extern'.
|
|
|
|
+-
|
|
|
|
+-Fixes build with '-fno-common'.
|
|
|
|
+-
|
|
|
|
+-Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
|
|
|
|
+-[Retrieved from:
|
|
|
|
+-https://github.com/eclipse/mraa/commit/aaa0a5cd4e401bde4fb3691dd4e6c70a5c61e031]
|
|
|
|
+-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
|
|
+----
|
|
|
|
+- include/version.h | 4 ++--
|
|
|
|
+- 1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
+-
|
|
|
|
+-diff --git a/include/version.h b/include/version.h
|
|
|
|
+-index 47366ef6f..3a567a1d5 100644
|
|
|
|
+---- a/include/version.h
|
|
|
|
+-+++ b/include/version.h
|
|
|
|
+-@@ -11,8 +11,8 @@
|
|
|
|
+- extern "C" {
|
|
|
|
+- #endif
|
|
|
|
+-
|
|
|
|
+--const char* gVERSION;
|
|
|
|
+--const char* gVERSION_SHORT;
|
|
|
|
+-+extern const char* gVERSION;
|
|
|
|
+-+extern const char* gVERSION_SHORT;
|
|
|
|
+-
|
|
|
|
+- #ifdef __cplusplus
|
|
|
|
+- }
|
|
|
|
+diff --git a/package/mraa/0002-common-increase-pin-name-size.patch b/package/mraa/0002-common-increase-pin-name-size.patch
|
|
|
|
+new file mode 100644
|
|
|
|
+index 0000000000..c2aaa57e79
|
|
|
|
+--- /dev/null
|
|
|
|
++++ b/package/mraa/0002-common-increase-pin-name-size.patch
|
|
|
|
+@@ -0,0 +1,27 @@
|
|
|
|
++From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
++From: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
|
|
|
|
++Date: Mon, 27 Feb 2023 16:31:13 +0100
|
|
|
|
++Subject: [PATCH] common: increase pin name size
|
|
|
|
++
|
|
|
|
++Some pin names are longer than 12 characters.
|
|
|
|
++32 characters should be enough while consuming not too
|
|
|
|
++much space.
|
|
|
|
++
|
|
|
|
++Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
|
|
|
|
++---
|
|
|
|
++ api/mraa/common.h | 2 +-
|
|
|
|
++ 1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
++
|
|
|
|
++diff --git a/api/mraa/common.h b/api/mraa/common.h
|
|
|
|
++index 6675f2d15771..13df2f1681fe 100644
|
|
|
|
++--- a/api/mraa/common.h
|
|
|
|
+++++ b/api/mraa/common.h
|
|
|
|
++@@ -32,7 +32,7 @@
|
|
|
|
++ /** Max size off Mraa Platform name */
|
|
|
|
++ #define MRAA_PLATFORM_NAME_MAX_SIZE 64
|
|
|
|
++ /** Size off Mraa pin name */
|
|
|
|
++-#define MRAA_PIN_NAME_SIZE 12
|
|
|
|
+++#define MRAA_PIN_NAME_SIZE 32
|
|
|
|
++
|
|
|
|
++ /** Bit Shift for Mraa sub platform */
|
|
|
|
++ #define MRAA_SUB_PLATFORM_BIT_SHIFT 9
|
|
|
|
+diff --git a/package/mraa/0003-iot2050-add-debugfs-pinmux-support.patch b/package/mraa/0003-iot2050-add-debugfs-pinmux-support.patch
|
|
|
|
+new file mode 100644
|
|
|
|
+index 0000000000..b363fe1bfe
|
|
|
|
+--- /dev/null
|
|
|
|
++++ b/package/mraa/0003-iot2050-add-debugfs-pinmux-support.patch
|
|
|
|
+@@ -0,0 +1,796 @@
|
|
|
|
++From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
++From: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
|
|
|
|
++Date: Thu, 23 Mar 2023 10:21:58 +0100
|
|
|
|
++Subject: [PATCH] iot2050: add debugfs pinmux support
|
|
|
|
++
|
|
|
|
++This patch adds support for multiplexing pins via debugfs rather
|
|
|
|
++than access memory mapped pad-configuration registers.
|
|
|
|
++The debugfs pinmux offers the possbility to run mraa on iot2050
|
|
|
|
++platforms as regular user instead of root by adjusting privileges
|
|
|
|
++on debugfs files.
|
|
|
|
++
|
|
|
|
++Bias settings are currently also configured by accessing pinmux.
|
|
|
|
++Unfortunatelly a proper upstream-like pinconf usage is currently
|
|
|
|
++not possible.
|
|
|
|
++
|
|
|
|
++Note: In case debugfs mux fails MRAA falls back to mmap mux.
|
|
|
|
++
|
|
|
|
++Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
|
|
|
|
++---
|
|
|
|
++ src/arm/siemens/iot2050.c | 547 ++++++++++++++++++++++++++++++++++++-
|
|
|
|
++ src/arm/siemens/platform.c | 4 +-
|
|
|
|
++ 2 files changed, 540 insertions(+), 11 deletions(-)
|
|
|
|
++
|
|
|
|
++diff --git a/src/arm/siemens/iot2050.c b/src/arm/siemens/iot2050.c
|
|
|
|
++index cec25faf0547..c63400d6b692 100644
|
|
|
|
++--- a/src/arm/siemens/iot2050.c
|
|
|
|
+++++ b/src/arm/siemens/iot2050.c
|
|
|
|
++@@ -24,6 +24,7 @@
|
|
|
|
++ #include <stdlib.h>
|
|
|
|
++ #include <string.h>
|
|
|
|
++ #include <sys/mman.h>
|
|
|
|
+++#include <limits.h>
|
|
|
|
++ #include <mraa/types.h>
|
|
|
|
++
|
|
|
|
++ #include "common.h"
|
|
|
|
++@@ -39,6 +40,9 @@ typedef struct {
|
|
|
|
++ uint16_t index;
|
|
|
|
++ uint16_t pinmap;
|
|
|
|
++ int8_t mode[MAX_MUX_REGISTER_MODE];
|
|
|
|
+++ const char *debugfs_path[MAX_MUX_REGISTER_MODE];
|
|
|
|
+++ const char *pmx_function[MAX_MUX_REGISTER_MODE];
|
|
|
|
+++ const char *pmx_group[MAX_MUX_REGISTER_MODE];
|
|
|
|
++ }regmux_info_t;
|
|
|
|
++
|
|
|
|
++ static void *pinmux_instance = NULL;
|
|
|
|
++@@ -75,30 +79,126 @@ iot2050_get_regmux_by_pinmap(int pinmap)
|
|
|
|
++ return NULL;
|
|
|
|
++ }
|
|
|
|
++
|
|
|
|
+++static mraa_result_t
|
|
|
|
+++iot2050_mux_debugfs(const char *base_dir, const char *group, const char *function, mraa_gpio_mode_t gpio_mode)
|
|
|
|
+++{
|
|
|
|
+++ FILE *fd = NULL;
|
|
|
|
+++ char p_pinmux[PATH_MAX];
|
|
|
|
+++ char mux[MRAA_PIN_NAME_SIZE];
|
|
|
|
+++ int ret;
|
|
|
|
+++
|
|
|
|
+++ syslog(LOG_DEBUG, "iot2050: debugfs: enter\n");
|
|
|
|
+++
|
|
|
|
+++ if (!base_dir || !group || !function) {
|
|
|
|
+++ syslog(LOG_ERR, "iot2050: debugfs: Invalid parameter base_dir=%s, group=%s, function=%s!\n", base_dir, group, function);
|
|
|
|
+++ return MRAA_ERROR_INVALID_PARAMETER;
|
|
|
|
+++ }
|
|
|
|
+++
|
|
|
|
+++ ret = snprintf(p_pinmux, PATH_MAX, "/sys/kernel/debug/pinctrl/%s/pinmux-select", base_dir);
|
|
|
|
+++ if (ret < 0) {
|
|
|
|
+++ ret = MRAA_ERROR_UNSPECIFIED;
|
|
|
|
+++ goto err;
|
|
|
|
+++ }
|
|
|
|
+++
|
|
|
|
+++ fd = fopen(p_pinmux, "w");
|
|
|
|
+++ if (!fd) {
|
|
|
|
+++ ret = MRAA_ERROR_INVALID_RESOURCE;
|
|
|
|
+++ goto err;
|
|
|
|
+++ }
|
|
|
|
+++
|
|
|
|
+++ switch (gpio_mode) {
|
|
|
|
+++ case MRAA_GPIO_PULLUP:
|
|
|
|
+++ snprintf(mux, MRAA_PIN_NAME_SIZE, "%s-%s", group, "pullup");
|
|
|
|
+++ break;
|
|
|
|
+++ case MRAA_GPIO_PULLDOWN:
|
|
|
|
+++ snprintf(mux, MRAA_PIN_NAME_SIZE, "%s-%s", group, "pulldown");
|
|
|
|
+++ break;
|
|
|
|
+++ default:
|
|
|
|
+++ strncpy(mux, group, MRAA_PIN_NAME_SIZE);
|
|
|
|
+++ }
|
|
|
|
+++
|
|
|
|
+++ syslog(LOG_DEBUG, "iot2050: debugfs: group: %s, function: %s\n", mux, mux);
|
|
|
|
+++
|
|
|
|
+++ ret = fprintf(fd, "%s %s\n", mux, mux);
|
|
|
|
+++ if (ret < 0) {
|
|
|
|
+++ ret = MRAA_ERROR_UNSPECIFIED;
|
|
|
|
+++ goto err_close;
|
|
|
|
+++ }
|
|
|
|
+++
|
|
|
|
+++ fclose(fd);
|
|
|
|
+++ return MRAA_SUCCESS;
|
|
|
|
+++
|
|
|
|
+++err_close:
|
|
|
|
+++ fclose(fd);
|
|
|
|
+++err:
|
|
|
|
+++ syslog(LOG_ERR, "iot2050: debugfs: Pinmux failed(%d)! group: %s, function: %s", ret, group, function);
|
|
|
|
+++ return ret;
|
|
|
|
+++}
|
|
|
|
+++
|
|
|
|
+++static mraa_result_t
|
|
|
|
+++iot2050_mux_mmap(int phy_pin, int mode, mraa_gpio_mode_t gpio_mode)
|
|
|
|
+++{
|
|
|
|
+++ int8_t mux_mode;
|
|
|
|
+++ regmux_info_t *info = &pinmux_info[phy_pin];
|
|
|
|
+++
|
|
|
|
+++ syslog(LOG_ERR, "iot2050: mmap: Debugfs pinmux failed! Falling back to mmap!");
|
|
|
|
+++
|
|
|
|
+++ pinmux_instance = platfrom_pinmux_get_instance("iot2050");
|
|
|
|
+++ if (!pinmux_instance) {
|
|
|
|
+++ syslog(LOG_ERR, "iot2050: mmap: Pinmux failed! Can't get pinmux instance!");
|
|
|
|
+++ return MRAA_ERROR_INVALID_RESOURCE;
|
|
|
|
+++ }
|
|
|
|
+++
|
|
|
|
+++ mux_mode = info->mode[mode];
|
|
|
|
+++ if (mux_mode < 0) {
|
|
|
|
+++ return MRAA_ERROR_FEATURE_NOT_SUPPORTED;
|
|
|
|
+++ }
|
|
|
|
+++
|
|
|
|
+++ syslog(LOG_DEBUG, "REGMUX[phy_pin %d] group %d index %d mode %d\n", phy_pin, info->group, info->index, mux_mode);
|
|
|
|
+++
|
|
|
|
+++ platform_pinmux_select_func(pinmux_instance, info->group, info->index, mux_mode);
|
|
|
|
+++ /* Configure as input and output for default */
|
|
|
|
+++ platform_pinmux_select_inout(pinmux_instance, info->group, info->index);
|
|
|
|
+++
|
|
|
|
+++ switch (gpio_mode) {
|
|
|
|
+++ case MRAA_GPIO_PULLUP:
|
|
|
|
+++ platform_pinmux_select_pull_up(pinmux_instance, info->group, info->index);
|
|
|
|
+++ break;
|
|
|
|
+++ case MRAA_GPIO_PULLDOWN:
|
|
|
|
+++ platform_pinmux_select_pull_down(pinmux_instance, info->group, info->index);
|
|
|
|
+++ break;
|
|
|
|
+++ default:
|
|
|
|
+++ break;
|
|
|
|
+++ }
|
|
|
|
+++ return MRAA_SUCCESS;
|
|
|
|
+++}
|
|
|
|
+++
|
|
|
|
+++
|
|
|
|
++ static mraa_result_t
|
|
|
|
++ iot2050_mux_init_reg(int phy_pin, int mode)
|
|
|
|
++ {
|
|
|
|
++ regmux_info_t *info = &pinmux_info[phy_pin];
|
|
|
|
++ int8_t mux_mode;
|
|
|
|
+++ mraa_result_t ret;
|
|
|
|
++
|
|
|
|
++ if((phy_pin < 0) || (phy_pin > MRAA_IOT2050_PINCOUNT))
|
|
|
|
++ return MRAA_SUCCESS;
|
|
|
|
++ if((mode < 0) || (mode >= MAX_MUX_REGISTER_MODE)) {
|
|
|
|
++ return MRAA_ERROR_FEATURE_NOT_SUPPORTED;
|
|
|
|
++ }
|
|
|
|
++- if(mode == MUX_REGISTER_MODE_AIO) {
|
|
|
|
+++ /* Dedicated SoC pins that have been statically defined in DTB */
|
|
|
|
+++ if(mode == MUX_REGISTER_MODE_AIO || mode == MUX_REGISTER_MODE_I2C) {
|
|
|
|
++ return MRAA_SUCCESS;
|
|
|
|
++ }
|
|
|
|
++ mux_mode = info->mode[mode];
|
|
|
|
++ if(mux_mode < 0) {
|
|
|
|
++ return MRAA_ERROR_FEATURE_NOT_SUPPORTED;
|
|
|
|
++ }
|
|
|
|
++- syslog(LOG_DEBUG, "REGMUX[phy_pin %d] group %d index %d mode %d\n", phy_pin, info->group, info->index, mux_mode);
|
|
|
|
++
|
|
|
|
++- platform_pinmux_select_func(pinmux_instance, info->group, info->index, mux_mode);
|
|
|
|
++- /* Configure as input and output for default */
|
|
|
|
++- platform_pinmux_select_inout(pinmux_instance, info->group, info->index);
|
|
|
|
++- return MRAA_SUCCESS;
|
|
|
|
+++ ret = iot2050_mux_debugfs(info->debugfs_path[mode], info->pmx_group[mode], info->pmx_function[mode], 0);
|
|
|
|
+++ if (ret != MRAA_SUCCESS)
|
|
|
|
+++ return iot2050_mux_mmap(phy_pin, mode, 0);
|
|
|
|
+++ return ret;
|
|
|
|
++ }
|
|
|
|
++
|
|
|
|
++ static mraa_result_t
|
|
|
|
++@@ -172,7 +272,10 @@ iot2050_gpio_mode_replace(mraa_gpio_context dev, mraa_gpio_mode_t mode)
|
|
|
|
++ goto failed;
|
|
|
|
++ }
|
|
|
|
++ if(info) {
|
|
|
|
++- platform_pinmux_select_pull_up(pinmux_instance, info->group, info->index);
|
|
|
|
+++ ret = iot2050_mux_debugfs(info->debugfs_path[0], info->pmx_group[0], info->pmx_function[0], mode);
|
|
|
|
+++ if (ret != MRAA_SUCCESS)
|
|
|
|
+++ ret = iot2050_mux_mmap(dev->phy_pin, 0, mode);
|
|
|
|
+++
|
|
|
|
++ }
|
|
|
|
++ break;
|
|
|
|
++ case MRAA_GPIO_PULLDOWN:
|
|
|
|
++@@ -181,7 +284,9 @@ iot2050_gpio_mode_replace(mraa_gpio_context dev, mraa_gpio_mode_t mode)
|
|
|
|
++ goto failed;
|
|
|
|
++ }
|
|
|
|
++ if(info) {
|
|
|
|
++- platform_pinmux_select_pull_down(pinmux_instance, info->group, info->index);
|
|
|
|
+++ ret = iot2050_mux_debugfs(info->debugfs_path[0], info->pmx_group[0], info->pmx_function[0], mode);
|
|
|
|
+++ if (ret != MRAA_SUCCESS)
|
|
|
|
+++ ret = iot2050_mux_mmap(dev->phy_pin, 0, mode);
|
|
|
|
++ }
|
|
|
|
++ break;
|
|
|
|
++ case MRAA_GPIO_HIZ:
|
|
|
|
++@@ -191,7 +296,9 @@ iot2050_gpio_mode_replace(mraa_gpio_context dev, mraa_gpio_mode_t mode)
|
|
|
|
++ goto failed;
|
|
|
|
++ }
|
|
|
|
++ if(info) {
|
|
|
|
++- platform_pinmux_select_pull_disable(pinmux_instance, info->group, info->index);
|
|
|
|
+++ ret = iot2050_mux_debugfs(info->debugfs_path[0], info->pmx_group[0], info->pmx_function[0], mode);
|
|
|
|
+++ if (ret != MRAA_SUCCESS)
|
|
|
|
+++ ret = iot2050_mux_mmap(dev->phy_pin, 0, mode);
|
|
|
|
++ }
|
|
|
|
++ break;
|
|
|
|
++ case MRAA_GPIOD_ACTIVE_LOW:
|
|
|
|
++@@ -455,7 +562,7 @@ mraa_siemens_iot2050()
|
|
|
|
++ free(b->adv_func);
|
|
|
|
++ goto error;
|
|
|
|
++ }
|
|
|
|
++- pinmux_instance = platfrom_pinmux_get_instance("iot2050");
|
|
|
|
+++
|
|
|
|
++ /* IO */
|
|
|
|
++ iot2050_setup_pins(b, pin_index, "IO0",
|
|
|
|
++ (mraa_pincapabilities_t) {
|
|
|
|
++@@ -477,6 +584,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d0-gpio",
|
|
|
|
+++ "d0-uart0-rxd",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d0-gpio",
|
|
|
|
+++ "d0-uart0-rxd",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++
|
|
|
|
++@@ -510,6 +638,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d1-gpio",
|
|
|
|
+++ "d1-uart0-txd",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d1-gpio",
|
|
|
|
+++ "d1-uart0-txd",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, wkup_gpio0_chip, 30, d4201_gpio_base+1, d4202_gpio_base+1, NULL, 0);
|
|
|
|
++@@ -542,6 +691,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d2-gpio",
|
|
|
|
+++ "d2-uart0-ctsn",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d2-gpio",
|
|
|
|
+++ "d2-uart0-ctsn",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, wkup_gpio0_chip, 31, d4201_gpio_base+2, d4202_gpio_base+2, NULL, 0);
|
|
|
|
++@@ -574,6 +744,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d3-gpio",
|
|
|
|
+++ "d3-uart0-rtsn",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d3-gpio",
|
|
|
|
+++ "d3-uart0-rtsn",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, wkup_gpio0_chip, 33, d4201_gpio_base+3, d4202_gpio_base+3, NULL, 0);
|
|
|
|
++@@ -606,6 +797,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ 5 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d4-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d4-ehrpwm0-a"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d4-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d4-ehrpwm0-a"
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, main_gpio0_chip, 33, d4201_gpio_base+4, d4202_gpio_base+4, NULL, 0);
|
|
|
|
++@@ -638,6 +850,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ 5 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d5-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d5-ehrpwm1-a"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d5-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d5-ehrpwm1-a"
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, main_gpio0_chip, 35, d4201_gpio_base+5, d4202_gpio_base+5, NULL, 0);
|
|
|
|
++@@ -670,6 +903,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ 5 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d6-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d6-ehrpwm2-a"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d6-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d6-ehrpwm2-a"
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, main_gpio0_chip, 38, d4201_gpio_base+6, d4202_gpio_base+6, NULL, 0);
|
|
|
|
++@@ -702,6 +956,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ 5 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d7-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d7-ehrpwm3-a"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d7-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d7-ehrpwm3-a"
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, main_gpio0_chip, 43, d4201_gpio_base+7, d4202_gpio_base+7, NULL, 0);
|
|
|
|
++@@ -734,6 +1009,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ 5 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d8-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d8-ehrpwm4-a"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d8-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d8-ehrpwm4-a"
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, main_gpio0_chip, 48, d4201_gpio_base+8, d4202_gpio_base+8, NULL, 0);
|
|
|
|
++@@ -766,6 +1062,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ 5 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "11c000.pinctrl-pinctrl-single"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d9-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d9-ehrpwm5-a"
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d9-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d9-ehrpwm5-a"
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, main_gpio0_chip, 51, d4201_gpio_base+9, d4202_gpio_base+9, NULL, 0);
|
|
|
|
++@@ -798,6 +1115,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ 0, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d10-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d10-spi0-cs0",
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d10-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d10-spi0-cs0",
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, wkup_gpio0_chip, 51, d4201_gpio_base+10, d4202_gpio_base+10, NULL, 0);
|
|
|
|
++@@ -830,6 +1168,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ 0, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d11-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d11-spi0-d0",
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d11-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d11-spi0-d0",
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, wkup_gpio0_chip, 49, d4201_gpio_base+11, d4202_gpio_base+11, NULL, 0);
|
|
|
|
++@@ -862,6 +1221,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ 0, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d12-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d12-spi0-d1",
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d12-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d12-spi0-d1",
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, wkup_gpio0_chip, 50, d4201_gpio_base+12, d4202_gpio_base+12, NULL, 0);
|
|
|
|
++@@ -894,6 +1274,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ 0, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d13-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d13-spi0-clk",
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "d13-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ "d13-spi0-clk",
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ iot2050_pin_add_gpio(b, pin_index, wkup_gpio0_chip, 48, d4201_gpio_base+13, d4202_gpio_base+13, NULL, 0);
|
|
|
|
++@@ -926,6 +1327,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a0-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a0-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ mux_info[0].pin = d4200_gpio_base+8;
|
|
|
|
++@@ -971,6 +1393,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a1-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a1-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ mux_info[0].pin = d4200_gpio_base+9;
|
|
|
|
++@@ -1016,6 +1459,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a2-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a2-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ mux_info[0].pin = d4200_gpio_base+10;
|
|
|
|
++@@ -1061,6 +1525,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ -1, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a3-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a3-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ mux_info[0].pin = d4200_gpio_base+11;
|
|
|
|
++@@ -1106,6 +1591,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ 0, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a4-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a4-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ mux_info[0].pin = d4200_gpio_base+12;
|
|
|
|
++@@ -1169,6 +1675,27 @@ mraa_siemens_iot2050()
|
|
|
|
++ 0, /*I2C*/
|
|
|
|
++ -1, /*SPI*/
|
|
|
|
++ -1 /*PWM*/
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "4301c000.pinctrl-pinctrl-single",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a5-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
+++ },
|
|
|
|
+++ {
|
|
|
|
+++ "a5-gpio",
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL,
|
|
|
|
+++ NULL
|
|
|
|
++ }
|
|
|
|
++ });
|
|
|
|
++ mux_info[0].pin = d4200_gpio_base+13;
|
|
|
|
++diff --git a/src/arm/siemens/platform.c b/src/arm/siemens/platform.c
|
|
|
|
++index faa808a4c6d0..fb87a7f2c47a 100644
|
|
|
|
++--- a/src/arm/siemens/platform.c
|
|
|
|
+++++ b/src/arm/siemens/platform.c
|
|
|
|
++@@ -35,7 +35,9 @@ platfrom_pinmux_get_instance(char *platform)
|
|
|
|
++ if((instance) && (instance->initialized == false) && (instance->ops.init)) {
|
|
|
|
++ return instance->ops.init()?instance:NULL;
|
|
|
|
++ }
|
|
|
|
++- else {
|
|
|
|
+++ else if((instance) && (instance->initialized == true)) {
|
|
|
|
+++ return instance;
|
|
|
|
+++ } else {
|
|
|
|
++ return NULL;
|
|
|
|
++ }
|
|
|
|
++ }
|
|
|
|
+diff --git a/package/mraa/mraa.hash b/package/mraa/mraa.hash
|
|
|
|
+deleted file mode 100644
|
|
|
|
+index 321b6409ed..0000000000
|
|
|
|
+--- a/package/mraa/mraa.hash
|
|
|
|
++++ /dev/null
|
|
|
|
+@@ -1,3 +0,0 @@
|
|
|
|
+-# Locally calculated
|
|
|
|
+-sha256 076669bee8423ffef3065735b293a329020be86630fea457174dbfcc67a0554a mraa-2.2.0.tar.gz
|
|
|
|
+-sha256 fac52622ed3badd86b34857b21777ab90296d6ccbc2ac0fd457c09fdeefa9ef1 COPYING
|
|
|
|
+diff --git a/package/mraa/mraa.mk b/package/mraa/mraa.mk
|
|
|
|
+index 47178a423b..78db12120a 100644
|
|
|
|
+--- a/package/mraa/mraa.mk
|
|
|
|
++++ b/package/mraa/mraa.mk
|
|
|
|
+@@ -4,8 +4,8 @@
|
|
|
|
+ #
|
|
|
|
+ ################################################################################
|
|
|
|
+
|
|
|
|
+-MRAA_VERSION = 2.2.0
|
|
|
|
+-MRAA_SITE = $(call github,eclipse,mraa,v$(MRAA_VERSION))
|
|
|
|
++MRAA_VERSION = 8b1c54934e80edc2d36abac9d9c96fe1e01cb669
|
|
|
|
++MRAA_SITE = $(call github,eclipse,mraa,$(MRAA_VERSION))
|
|
|
|
+ MRAA_LICENSE = MIT
|
|
|
|
+ MRAA_LICENSE_FILES = COPYING
|
|
|
|
+ MRAA_INSTALL_STAGING = YES
|