Home
last modified time | relevance | path

Searched +full:turris +full:- +full:omnia +full:- +full:mcu (Results 1 – 14 of 14) sorted by relevance

/linux/drivers/platform/cznic/
H A DMakefile1 # SPDX-License-Identifier: GPL-2.0-only
3 obj-$(CONFIG_TURRIS_OMNIA_MCU) += turris-omnia-mcu.o
4 turris-omnia-mcu-y := turris-omnia-mcu-base.o
5 turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_GPIO) += turris-omnia-mcu-gpio.o
6 turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_SYSOFF_WAKEUP) += turris-omnia-mcu-sys-off-wakeup.o
7 turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_TRNG) += turris-omnia-mcu-trng.o
8 turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_WATCHDOG) += turris-omnia-mcu-watchdog.o
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
4 # see Documentation/kbuild/kconfig-language.rst.
8 bool "Platform support for CZ.NIC's Turris hardware"
10 Say Y here to be able to choose driver support for CZ.NIC's Turris
16 tristate "Turris Omnia MCU driver"
21 microcontroller on the CZ.NIC's Turris Omnia SOHO router.
25 called turris-omnia-mcu.
30 bool "Turris Omnia MCU GPIOs"
36 Say Y here to add support for controlling MCU GPIO pins and receiving
37 MCU interrupts on CZ.NIC's Turris Omnia.
[all …]
H A Dturris-omnia-mcu-trng.c1 // SPDX-License-Identifier: GPL-2.0
3 * CZ.NIC's Turris Omnia MCU TRNG driver
21 #include <linux/turris-omnia-mcu-interface.h>
22 #include "turris-omnia-mcu.h"
28 struct omnia_mcu *mcu = dev_id; in omnia_trng_irq_handler() local
30 complete(&mcu->trng_entropy_ready); in omnia_trng_irq_handler()
37 struct omnia_mcu *mcu = container_of(rng, struct omnia_mcu, trng); in omnia_trng_read() local
41 if (!wait && !completion_done(&mcu->trng_entropy_ready)) in omnia_trng_read()
45 if (wait_for_completion_interruptible(&mcu->trng_entropy_ready)) in omnia_trng_read()
46 return -ERESTARTSYS; in omnia_trng_read()
[all …]
H A Dturris-omnia-mcu-watchdog.c1 // SPDX-License-Identifier: GPL-2.0
3 * CZ.NIC's Turris Omnia MCU watchdog driver
16 #include <linux/turris-omnia-mcu-interface.h>
17 #include "turris-omnia-mcu.h"
32 struct omnia_mcu *mcu = watchdog_get_drvdata(wdt); in omnia_wdt_start() local
34 return omnia_cmd_write_u8(mcu->client, OMNIA_CMD_SET_WATCHDOG_STATE, 1); in omnia_wdt_start()
39 struct omnia_mcu *mcu = watchdog_get_drvdata(wdt); in omnia_wdt_stop() local
41 return omnia_cmd_write_u8(mcu->client, OMNIA_CMD_SET_WATCHDOG_STATE, 0); in omnia_wdt_stop()
46 struct omnia_mcu *mcu = watchdog_get_drvdata(wdt); in omnia_wdt_ping() local
48 return omnia_cmd_write_u8(mcu->client, OMNIA_CMD_SET_WATCHDOG_STATE, 1); in omnia_wdt_ping()
[all …]
H A Dturris-omnia-mcu-base.c1 // SPDX-License-Identifier: GPL-2.0
3 * CZ.NIC's Turris Omnia MCU driver
19 #include <linux/turris-omnia-mcu-interface.h>
20 #include "turris-omnia-mcu.h"
33 msgs[0].addr = client->addr; in omnia_cmd_write_read()
40 msgs[1].addr = client->addr; in omnia_cmd_write_read()
47 ret = i2c_transfer(client->adapter, msgs, num); in omnia_cmd_write_read()
51 return -EIO; in omnia_cmd_write_read()
56 static int omnia_get_version_hash(struct omnia_mcu *mcu, bool bootloader, in omnia_get_version_hash() argument
63 err = omnia_cmd_read(mcu->client, in omnia_get_version_hash()
[all …]
H A Dturris-omnia-mcu-sys-off-wakeup.c1 // SPDX-License-Identifier: GPL-2.0
3 * CZ.NIC's Turris Omnia MCU system off and RTC wakeup driver
6 * real-time clock), rather the MCU implements a wakeup from powered off state
7 * at a specified time relative to MCU boot, and we expose this feature via RTC
25 #include <linux/turris-omnia-mcu-interface.h>
26 #include "turris-omnia-mcu.h"
65 struct omnia_mcu *mcu = i2c_get_clientdata(client); in omnia_read_alarm() local
73 alrm->enabled = !!wakeup; in omnia_read_alarm()
74 rtc_time64_to_tm(wakeup ?: mcu->rtc_alarm, &alrm->time); in omnia_read_alarm()
82 struct omnia_mcu *mcu = i2c_get_clientdata(client); in omnia_set_alarm() local
[all …]
H A Dturris-omnia-mcu-gpio.c1 // SPDX-License-Identifier: GPL-2.0
3 * CZ.NIC's Turris Omnia MCU GPIO and IRQ driver
14 #include <linux/devm-helpers.h>
25 #include <linux/turris-omnia-mcu-interface.h>
26 #include "turris-omnia-mcu.h"
32 /* GPIOs with value read from the 16-bit wide status */
35 [6] = "Front USB3 port over-current",
36 [7] = "Rear USB3 port over-current",
41 /* GPIOs with value read from the 32-bit wide extended status */
64 /* GPIOs with value read from the 16-bit wide extended control status */
[all …]
H A Dturris-omnia-mcu.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * CZ.NIC's Turris Omnia MCU driver
41 /* Old MCU firmware handling needs the following */
48 /* RTC device for configuring wake-up */
55 /* MCU watchdog */
196 int omnia_mcu_register_gpiochip(struct omnia_mcu *mcu);
198 static inline int omnia_mcu_register_gpiochip(struct omnia_mcu *mcu) in omnia_mcu_register_gpiochip() argument
206 int omnia_mcu_register_sys_off_and_wakeup(struct omnia_mcu *mcu);
208 static inline int omnia_mcu_register_sys_off_and_wakeup(struct omnia_mcu *mcu) in omnia_mcu_register_sys_off_and_wakeup() argument
215 int omnia_mcu_register_trng(struct omnia_mcu *mcu);
[all …]
/linux/Documentation/devicetree/bindings/firmware/
H A Dcznic,turris-omnia-mcu.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/firmware/cznic,turris-omnia-mcu.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: CZ.NIC's Turris Omnia MCU
10 - Marek Behún <kabel@kernel.org>
13 The MCU on Turris Omnia acts as a system controller providing additional
18 const: cznic,turris-omnia-mcu
21 description: MCU I2C slave address
27 interrupt-controller: true
[all …]
/linux/Documentation/ABI/testing/
H A Dsysfs-bus-i2c-devices-turris-omnia-mcu7 Only available if board information is burned in the MCU (older
8 revisions have board information burned in the ATSHA204-A chip).
16 Description: (RO) Contains device first MAC address. Each Turris Omnia is
20 Only available if board information is burned in the MCU (older
21 revisions have board information burned in the ATSHA204-A chip).
29 Description: (RW) The front button on the Turris Omnia router can be
35 - ``mcu`` makes the button press event be handled by the MCU to
37 - ``cpu`` makes the button press event be handled by the CPU.
46 Turris Omnia router support powering off the router into true
63 MCU firmware is too old, this file reads 0x0.
[all …]
/linux/drivers/leds/
H A Dleds-turris-omnia.c1 // SPDX-License-Identifier: GPL-2.0
3 * CZ.NIC's Turris Omnia LEDs driver
9 #include <linux/led-class-multicolor.h>
18 /* MCU controller commands at I2C address 0x2a */
91 return -EIO; in omnia_cmd_read_raw()
99 err = omnia_cmd_read_raw(client->adapter, client->addr, cmd, &reply, 1); in omnia_cmd_read_u8()
113 cmd[1] = led->reg; in omnia_led_send_color_cmd()
114 cmd[2] = led->subled_info[0].brightness; in omnia_led_send_color_cmd()
115 cmd[3] = led->subled_info[1].brightness; in omnia_led_send_color_cmd()
116 cmd[4] = led->subled_info[2].brightness; in omnia_led_send_color_cmd()
[all …]
/linux/arch/arm/boot/dts/marvell/
H A Darmada-385-turris-omnia.dts1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * Device Tree file for the Turris Omnia
5 * Copyright (C) 2016 Uwe Kleine-König <uwe@kleine-koenig.org>
8 * Schematic available at https://www.turris.cz/doc/_media/rtrom01-schema.pdf
11 /dts-v1/;
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/input/input.h>
15 #include <dt-bindings/leds/common.h>
16 #include "armada-385.dtsi"
19 model = "Turris Omnia";
[all …]
/linux/include/linux/
H A Dturris-omnia-mcu-interface.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * CZ.NIC's Turris Omnia MCU I2C interface commands definitions
25 OMNIA_CMD_SET_WATCHDOG_STATE = 0x0B, /* 0 - disable
26 * 1 - enable / ping
78 /* available only at address 0x2b (LED-controller) */
83 /* available only at address 0x2b (LED-controller) */
149 * Therefore to consider bits 16 - 31 valid, one bit (20) was reserved
153 /* Bits 16 - 19 correspond to bits 0 - 3 of status word */
/linux/
H A DMAINTAINERS5 ---------------------------------------------------
21 W: *Web-page* with status/info
23 B: URI for where to file *bugs*. A web-page with detailed bug
28 patches to the given subsystem. This is either an in-tree file,
29 or a URI. See Documentation/maintainer/maintainer-entry-profile.rst
46 N: [^a-z]tegra all files whose path contains tegra
64 ----------------
83 3WARE SAS/SATA-RAID SCSI DRIVERS (3W-XXXX, 3W-9XXX, 3W-SAS)
85 L: linux-scsi@vger.kernel.org
88 F: drivers/scsi/3w-*
[all …]