Private
Public Access
2
0
Commit Graph

230 Commits

Author SHA1 Message Date
Nascs
8a37e75f4a platform: add radxa zero3 support
Signed-off-by: Nascs <nascs@radxa.com>
2024-08-28 07:57:39 -07:00
Nascs
4754c5ef29 radxa cm5 io: remove useless pwm pins
Signed-off-by: Nascs <nascs@radxa.com>
2024-07-11 12:43:00 -07:00
Nascs
9374cc49c6 platform: fix the pwm function of radxa boards
Signed-off-by: Nascs <nascs@radxa.com>
2024-07-11 12:43:00 -07:00
Nascs
258bfcf3da radxa cm3: fix pin 26
Signed-off-by: Nascs <nascs@radxa.com>
2024-02-28 17:24:47 -08:00
Nascs
60d99f1a59 platform: add radxa e25 support
Signed-off-by: Nascs <nascs@radxa.com>
2024-01-23 08:42:50 -08:00
Chuckduey
302280363f Adding in RPI 5 support
Signed-off-by: Chuckduey <cduey@msn.com>
2024-01-23 08:41:11 -08:00
Nascs
ed793eb615 platform: add Radxa ROCK 3A platform support
Signed-off-by: Nascs <nascs@radxa.com>
2023-12-05 15:04:30 -08:00
nascs
d055b45b7e platform: add Radxa CM5 IO platform support
Signed-off-by: Nascs <nascs@radxa.com>
2023-11-08 14:40:24 -08:00
nascs
651131b475 platform: add Radxa CM3 platform support
Signed-off-by: Nascs <nascs@radxa.com>
Co-authored-by: ZHANG Yuntian <yt@radxa.com>
2023-10-26 21:03:36 -07:00
nascs
81ece69655 platform: add Radxa ROCK 3B platform support
Signed-off-by: Nascs <nascs@radxa.com>
2023-10-20 16:00:46 -07:00
Gunjan Gupta
f727c01d2e Add support for Orange Pi Prime 2023-10-19 17:44:03 -07:00
Nascs
db1f5207b9 platform: add Radxa ROCK 5B platform support
Signed-off-by: Nascs <nascs@radxa.com>
2023-10-12 14:33:58 -07:00
nascs
7a45f17f79 platform: add Radxa ROCK 5A platform support
Signed-off-by: Nascs <nascs@radxa.com>
2023-09-26 19:41:37 -07:00
Daniel Bovensiepen
0df2e0f417 platform: Add RISC-V architecture with VisionFive
Add RISC-V architecture and StarFive JH71x0-based boards
VisionFive and VisionFive 2.

Signed-off-by: Daniel Bovensiepen <oss@bovi.li>
Signed-off-by: Zhu Jia Xing <jiaxing.zhu@siemens.com>
2023-09-21 09:25:08 -07:00
nascs
09cea58214 platform: add Radxa ROCK 3C platform support
Signed-off-by: Nascs <nascs@radxa.com>
2023-09-11 13:04:51 -07:00
Jan Kiszka
8b1c54934e iot2050: Add USER button
A simple GPIO, no muxing needed, no pulling supported. Therefore, reject
any mode changes that request pull up/down, ignore the others.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-08-05 12:04:23 -07:00
Ivan Mikhaylov
a9f0ff22e8 platform: add iot2050 platform support
This patch introuduce iot2050 platform support, it is the port from
meta-iot2050 layer.

Based on original patch by Le Jin.

Signed-off-by: Le Jin <le.jin@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
2022-08-05 12:04:23 -07:00
Jan Kiszka
0c44a7291b gpio: chardev: Add function to retrieve sysfs base for a gpiochip
This allows to full mux structures which still need the sysfs GPIO
numbers. In combination with mraa_find_gpio_line_by_name, this allows
for platform setup that is independent of the gpiochip probing order.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-08-05 12:04:23 -07:00
Jan Kiszka
56a11363de gpio: chardev: Add helper to retrieve gpiochip and line offset by line name
This makes the retrieval robust against chips being reordered during
boot. The results can be used to fill out mraa_pin_t while initializing
a board.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-08-05 12:04:23 -07:00
Ivan Mikhaylov
307a6f3bdd mux: add mux interface
Add mux_init_reg interface with different mux modes for GPIO, UART, SPI,
I2C, PWM, AIO.

Signed-off-by: Le Jin <le.jin@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
2022-08-05 12:04:23 -07:00
Björn Esser
aaa0a5cd4e include: Declare gVERSION global as 'extern'.
Fixes build with '-fno-common'.

Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2021-06-29 12:06:41 -07:00
Jan Kiszka
954b17ded4 led: Fix and cleanup initialization
The structure returned by readdir is may be statically allocated.
Keeping a pointer to it is broken.

The LED path is generally not a directory, it's a link to a directory.
And even if it were a directory, that would tell nothing about the
caller's access permissions.

And then there is a lot of duplication between mraa_led_init and
mraa_led_init_raw.

This addresses that all.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-06-29 11:49:25 -07:00
Arora, Jeet
31c4a8d0db Added Intel Learning kit to platforms.
Signed-off-by: Arora, Jeet <jeet.arora@intel.com>
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2021-04-07 12:41:08 -07:00
Chuckduey
bb1c6df16b Added Raspberry Pi 400 to platforms
Signed-off-by: Chuckduey <cduey@msn.com>
2021-02-01 13:35:09 -08:00
Chuck Duey
f58cdc9da4 Added Raspberry Pi 4 1GB 2GB and 4GB to the list of detected platforms
Signed-off-by: Chuck Duey <cduey@msn.com>
2020-01-10 09:33:19 -08:00
Michael Campion
1d18da9a22 upxtreme: add spdx tags to source files
Remove MIT notice and replace with SPDX tags in UP Xtreme sources.

Signed-off-by: Michael Campion <michael.campion@emutex.com>
2020-01-06 15:17:55 +00:00
Michael Campion
d954599045 upxtreme: Add UP Xtreme support
UP Xtreme is based on the Intel(R) Core(TM) i3/i5/i7 Whiskey Lake SoCs.
The UP Xtreme presents one Raspberry Pi compatible HAT connector.

This implementaion supports i2c, spi, uart, adc and gpio through the
40pin HAT connector.

Gpio chardev capabilities have been disabled in this implementation. When
gpio chardev capabilities are enabled an input becomes unreadable after an
isr has been registered to the pin. See here for details:

https://github.com/intel-iot-devkit/mraa/issues/937

Tested on UP Xtreme, with UP Board Linux kernel 5.0.0
Features tested: gpio, gpio interrupts, i2c, spi, adc and uart.

Signed-off-by: Michael Campion <michael.campion@emutex.com>
2020-01-06 15:17:55 +00:00
gowtham.r
4ba5da1144 adding Adlink IPi SMARC x86/ARM support
Signed-off-by: gowtham.r <gowtham.r@adlinktech.com>
2019-12-03 07:52:58 -08:00
Thomas Ingleby
170bdd104f spdx: add spdx tags to most files
Large change that removes the duplicated MIT notice withe a spdx tag

Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2019-05-23 10:09:12 -07:00
Manivannan Sadhasivam
0a12c5a017 gpio: Introduce mraa_gpio_init_by_name API
This commit introduces mraa_gpio_init_by_name API for initializing
a GPIO by its line name provided by the kernel. This feature depends
on the GPIO chardev support and also the line names present in devicetree
or board files. Accessing GPIO using its line name, removes the dependency
from MRAA specific pin mapping and provides a cleaner way to access GPIOs.
This will solve the issue created by an external gpiochip probing before
the SoC's internal gpio controller and thereby making the MRAA pin mapping
wrong.

Currently, this API only supports initializing a single GPIO at a time.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2019-05-10 16:29:13 +05:30
Brian Lee
b8349c0ffe rockpi4: Add rockpi4 support
Closes #958

Signed-off-by: Brian Lee <brian@vamrs.com>
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2019-03-28 13:09:46 -07:00
Brett Haines
7a1db249fe rpi: Added Raspberry Pi 3 A+ definitions
Signed-off-by: Brett Haines <bhaines418@gmail.com>
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2018-11-29 09:53:11 -08:00
Chuck Duey
d3207769e7 rpi: Added Raspberry Pi 3 B+ to Hardware Versions with corrections
Signed-off-by: Chuck Duey <cduey@msn.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-10-09 09:58:36 -07:00
Manivannan Sadhasivam
6fcd882d58 led: Add support for initializing onboard LEDs based on board definition
1. Add support for initializing onboard LEDs based on board definition.
Maximum LED count has been set to 12.

2. Introduce mraa_led_init_raw API for initializing LEDs based on
function name. This API can be used by platforms which doesn't have mapping
in board definition.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
2018-09-05 09:05:26 +05:30
Mihai Stefanescu
ae391fe9fe String based IO initialization for MRAA
Signed-off-by: Mihai Stefanescu <mihai.stefanescu@rinftech.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-07-23 21:40:12 -07:00
Noel Eck
fc4b2a554d Platform_extender: FT4222 library refactor
Updates to make the FT4222 platform extender more usable.

Previous implementation opened libft4222.so and loaded symbols as
needed.  This implementation removes dynamic loading of libft4222 in
favor of creating a new shared libary which links against libft4222.so.
The dynamic loading is now done in mraa.c.  One C method is exposed in
libmraa-platform-ft4222.so for finding/initializing an FT4222:

mraa_platform_t mraa_usb_platform_extender(mraa_board_t* board);

Mraa.c attempts to open this platform library and calls the
mraa_usb_platform_extender method.  If an ftdi4222 is connected, the
user gets added IO from the extender.  If no FT4222 device is connected,
continue as normal.

    * Create a new platform library for the FT4222
    * Expose only 1 C method from the library -
      mraa_usb_platform_extender
    * libmraa-platform-ft4222.so contains CXX code (as well as previous
      C code).  All *allocs have been removed in favor of global
      C++ stl containers.
    * Previously, the FT4222 would only initialize correctly if 2 ftdi
      devices existed.  Now, initialize FT4222 devices based on the
      device id.
    * Many fixes for various problems with the FT4222
    * Added unit test for platform extender (minimal functionality w/o hw)
    * Updated to FindFtd4222.cmake module to handle standard arguments
    * Removed CMAKE_C_FLAGS addition of -DFTDID2XX and -DFTDI4222 since
      these are NOT used anywhere in source.
    * Building the FTDI4222 shim requires libft4222.h which requires
      ftd2xx.h.  Updated CMakeLists.txt to require both when building
      the shim.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-26 12:57:13 -07:00
Noel Eck
a2f01bee5f mraa.c: Added pointer to pointer back to find_uart
Went a bit too far with the previous commit.  Added pointer to pointer
back to mraa_find_uart_bus_pci.

Tested leaks against valgrind and verified dev_path gets set with gdb.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-14 21:21:37 -07:00
Noel Eck
17342cbbbb mraa.c: Fixed memleak of device_path for IEI_TANK
Unfortunately the device_path char* is dynamically allocated
and #defined and const char *'ed depending on how each platform provided the
uart device paths which makes cleaning it up more complicated.

Added a check for the IEI_TANK.

Removed the char** (in favor of a char*) for mraa_find_uart_bus_pci.)

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-06-14 15:18:29 -07:00
Mihai Tudor Panu
9c5f940dad aiotdevkit: add support for IEI Tank platforms
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-05-31 21:21:53 -07:00
Abhishek Malik
cfda9c99d7 UART: Fixing UART issues on UP2
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2018-03-14 16:21:42 -07:00
mihais
2b98fc7869 gpio: chardev interface / multiple gpio support for sysfs
Signed-off-by: Mihai Stefanescu <mihai.t.gh.stefanescu@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Brendan Le Foll
fbc2ad6045 chardev: split up helper functions in gpio_chardev
Remove some _multiple functions and replace with generic function that
does both. Some general cleanup and will move more interrnal mraa
functions to use the _mraa prefix

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Mihai Stefanescu
9f7caf1561 Joule: Add gpiod mapping for Joule
Signed-off-by: Mihai Stefanescu <mihai.t.gh.stefanescu@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Brendan Le Foll
12c1904fba gpio.h: Add stripped kernel header
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Mihai Stefanescu
1665e09928 gpio: Add gpio chardev interface
Signed-off-by: Mihai Stefanescu <mihai.t.gh.stefanescu@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Manivannan Sadhasivam
e1382ad845 led: Add on board LED support
This patch adds support for using on board LED through sysfs.
Commonly available LED parameters are supported.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-10-19 14:01:14 +02:00
Serge Vakulenko
6770be911b Add support for MIPS-based boards Omega2 and Linkit Smart 7688
Signed-off-by: Serge Vakulenko <vak@besm6.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-10-05 10:54:57 +02:00
Sergey Kiselev
99287f40a1 rpi: Add support for Raspberry Pi Zero W
This patch adds support and autodetection for Raspberry Pi Zero W.
It also adds more revisions for Raspbery Pi Zero from here:
http://elinux.org/RPi_HardwareHistory

Signed-off-by: Sergey Kiselev <sergey.kiselev@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-10-04 11:56:33 +02:00
Mihai Tudor Panu
cc55ee6314 grovepi: grovepi subplatform support via i2c
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-14 13:10:37 +02:00
Javier Arteaga
04a40ed63f src/x86/up2.c: Add UP^2 EVT3 support
This commit adds a MRAA platform for the UP Squared board, EVT3 revision.
It handles the relevant FPGA configuration updates when using MRAA to
change pin modes or toggle GPIO directions.

Signed-off-by: Javier Arteaga <javier@emutex.com>
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:54:39 +02:00