Home
last modified time | relevance | path

Searched full:mcu (Results 1 – 25 of 294) sorted by relevance

12345678910>>...12

/linux/drivers/platform/cznic/
H A Dturris-omnia-mcu-gpio.c3 * CZ.NIC's Turris Omnia MCU GPIO and IRQ driver
26 #include <linux/turris-omnia-mcu-interface.h>
27 #include "turris-omnia-mcu.h"
234 static int omnia_ctl_cmd_locked(struct omnia_mcu *mcu, u8 cmd, u16 val, u16 mask) in omnia_ctl_cmd_locked() argument
258 return omnia_cmd_write(mcu->client, buf, len); in omnia_ctl_cmd_locked()
261 static int omnia_ctl_cmd(struct omnia_mcu *mcu, u8 cmd, u16 val, u16 mask) in omnia_ctl_cmd() argument
263 guard(mutex)(&mcu->lock); in omnia_ctl_cmd()
265 return omnia_ctl_cmd_locked(mcu, cmd, val, mask); in omnia_ctl_cmd()
278 struct omnia_mcu *mcu = gpiochip_get_data(gc); in omnia_gpio_get_direction() local
283 scoped_guard(mutex, &mcu->lock) { in omnia_gpio_get_direction()
[all …]
H A Dturris-omnia-mcu-base.c3 * CZ.NIC's Turris Omnia MCU driver
19 #include <linux/turris-omnia-mcu-interface.h>
20 #include "turris-omnia-mcu.h"
57 static int omnia_get_version_hash(struct omnia_mcu *mcu, bool bootloader, in omnia_get_version_hash() argument
64 err = omnia_cmd_read(mcu->client, in omnia_get_version_hash()
80 struct omnia_mcu *mcu = dev_get_drvdata(dev); in fw_version_hash_show() local
84 err = omnia_get_version_hash(mcu, bootloader, version); in fw_version_hash_show()
110 struct omnia_mcu *mcu = dev_get_drvdata(dev); in fw_features_show() local
112 return sysfs_emit(buf, "0x%x\n", mcu->features); in fw_features_show()
119 struct omnia_mcu *mcu = dev_get_drvdata(dev); in mcu_type_show() local
[all …]
H A Dturris-omnia-mcu-watchdog.c3 * 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()
54 struct omnia_mcu *mcu = watchdog_get_drvdata(wdt); in omnia_wdt_set_timeout() local
[all …]
H A Dturris-omnia-mcu-keyctl.c3 * CZ.NIC's Turris Omnia MCU ECDSA message signing via keyctl
20 #include <linux/turris-omnia-mcu-interface.h>
22 #include "turris-omnia-mcu.h"
27 struct omnia_mcu *mcu = dev_id; in omnia_msg_signed_irq_handler() local
30 err = omnia_cmd_read(mcu->client, OMNIA_CMD_CRYPTO_COLLECT_SIGNATURE, in omnia_msg_signed_irq_handler()
35 guard(mutex)(&mcu->sign_lock); in omnia_msg_signed_irq_handler()
37 if (mcu->sign_requested) { in omnia_msg_signed_irq_handler()
38 mcu->sign_err = err; in omnia_msg_signed_irq_handler()
40 memcpy(mcu->signature, &reply[1], in omnia_msg_signed_irq_handler()
42 mcu->sign_requested = false; in omnia_msg_signed_irq_handler()
[all …]
H A Dturris-omnia-mcu-sys-off-wakeup.c3 * 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
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
84 mcu->rtc_alarm = rtc_tm_to_time64(&alrm->time); in omnia_set_alarm()
88 mcu->rtc_alarm); in omnia_set_alarm()
[all …]
H A Dturris-omnia-mcu-trng.c3 * CZ.NIC's Turris Omnia MCU TRNG driver
18 #include <linux/turris-omnia-mcu-interface.h>
19 #include "turris-omnia-mcu.h"
25 struct omnia_mcu *mcu = dev_id; in omnia_trng_irq_handler() local
27 complete(&mcu->trng_entropy_ready); in omnia_trng_irq_handler()
34 struct omnia_mcu *mcu = container_of(rng, struct omnia_mcu, trng); in omnia_trng_read() local
38 if (!wait && !completion_done(&mcu->trng_entropy_ready)) in omnia_trng_read()
42 if (wait_for_completion_interruptible(&mcu->trng_entropy_ready)) in omnia_trng_read()
45 err = omnia_cmd_read(mcu->client, in omnia_trng_read()
59 int omnia_mcu_register_trng(struct omnia_mcu *mcu) in omnia_mcu_register_trng() argument
[all …]
H A Dturris-omnia-mcu.h3 * CZ.NIC's Turris Omnia MCU driver
32 * @type: MCU type (STM32, GD32, MKL, or unknown)
33 * @features: bitmap of features supported by the MCU firmware
34 * @board_serial_number: board serial number, if stored in MCU
35 * @board_first_mac: board first MAC address, if stored in MCU
36 * @board_revision: board revision, if stored in MCU
47 * @button_release_emul_work: front button release emulation work, used with old MCU firmware
51 * determine which interrupt events occurred, used with old MCU
58 * @rtc_alarm: RTC alarm that was set for the board to wake up on, in MCU time
59 * (seconds since last MCU reset)
[all …]
H A DMakefile3 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_KEYCTL) += turris-omnia-mcu-keyctl.o
7 turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_SYSOFF_WAKEUP) += turris-omnia-mcu-sys-off-wakeup.o
8 turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_TRNG) += turris-omnia-mcu-trng.o
9 turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_WATCHDOG) += turris-omnia-mcu-watchdog.o
H A DKconfig17 tristate "Turris Omnia MCU driver"
26 called turris-omnia-mcu.
31 bool "Turris Omnia MCU GPIOs"
37 Say Y here to add support for controlling MCU GPIO pins and receiving
38 MCU interrupts on CZ.NIC's Turris Omnia.
53 bool "Turris Omnia MCU system off and RTC wakeup"
62 bool "Turris Omnia MCU watchdog"
68 Omnia MCU.
71 bool "Turris Omnia MCU true random number generator"
77 provided by CZ.NIC's Turris Omnia MCU.
[all …]
/linux/drivers/net/wireless/mediatek/mt76/
H A Dmt76x02_usb_mcu.c26 WARN_ON_ONCE(len / 8 != usb->mcu.rp_len); in mt76x02u_multiple_mcu_reads()
28 for (i = 0; i < usb->mcu.rp_len; i++) { in mt76x02u_multiple_mcu_reads()
29 u32 reg = get_unaligned_le32(data + 8 * i) - usb->mcu.base; in mt76x02u_multiple_mcu_reads()
32 WARN_ON_ONCE(usb->mcu.rp[i].reg != reg); in mt76x02u_multiple_mcu_reads()
33 usb->mcu.rp[i].value = val; in mt76x02u_multiple_mcu_reads()
40 u8 *data = usb->mcu.data; in mt76x02u_mcu_wait_resp()
52 if (usb->mcu.rp) in mt76x02u_mcu_wait_resp()
60 dev_err(dev->dev, "error: MCU resp evt:%lx seq:%hhx-%lx\n", in mt76x02u_mcu_wait_resp()
83 seq = ++dev->mcu.msg_seq & 0xf; in __mt76x02u_mcu_send_msg()
85 seq = ++dev->mcu.msg_seq & 0xf; in __mt76x02u_mcu_send_msg()
[all …]
H A Dmcu.c41 wait_event_timeout(dev->mcu.wait, in mt76_mcu_get_response()
42 (!skb_queue_empty(&dev->mcu.res_q) || in mt76_mcu_get_response()
45 return skb_dequeue(&dev->mcu.res_q); in mt76_mcu_get_response()
51 skb_queue_tail(&dev->mcu.res_q, skb); in mt76_mcu_rx_event()
52 wake_up(&dev->mcu.wait); in mt76_mcu_rx_event()
84 mutex_lock(&dev->mcu.mutex); in mt76_mcu_skb_send_and_get_msg()
106 expires = jiffies + dev->mcu.timeout; in mt76_mcu_skb_send_and_get_msg()
128 mutex_unlock(&dev->mcu.mutex); in mt76_mcu_skb_send_and_get_msg()
H A Dmt76x02_mcu.c20 dev_err(mdev->dev, "MCU message %02x (seq %d) timed out\n", in mt76x02_mcu_parse_response()
51 mutex_lock(&mdev->mcu.mutex); in mt76x02_mcu_msg_send()
53 seq = ++mdev->mcu.msg_seq & 0xf; in mt76x02_mcu_msg_send()
55 seq = ++mdev->mcu.msg_seq & 0xf; in mt76x02_mcu_msg_send()
76 mutex_unlock(&mdev->mcu.mutex); in mt76x02_mcu_msg_send()
153 while ((skb = skb_dequeue(&dev->mt76.mcu.res_q)) != NULL) in mt76x02_mcu_cleanup()
/linux/Documentation/devicetree/bindings/iio/
H A Dsamsung,sensorhub-rinato.yaml13 Sensorhub is a MCU which manages several sensors and also plays the role
28 ap-mcu-gpios:
33 mcu-ap-gpios:
38 mcu-reset-gpios:
47 - ap-mcu-gpios
48 - mcu-ap-gpios
49 - mcu-reset-gpios
68 ap-mcu-gpios = <&gpx0 0 0>;
69 mcu-ap-gpios = <&gpx0 4 0>;
70 mcu-reset-gpios = <&gpx0 5 0>;
/linux/drivers/thermal/
H A Dkhadas_mcu_fan.c3 * Khadas MCU Controlled FAN driver
12 #include <linux/mfd/khadas-mcu.h>
20 struct khadas_mcu *mcu; member
30 ret = regmap_write(ctx->mcu->regmap, KHADAS_MCU_CMD_FAN_STATUS_CTRL_REG, in khadas_mcu_fan_set_level()
81 struct khadas_mcu *mcu = dev_get_drvdata(pdev->dev.parent); in khadas_mcu_fan_probe() local
90 ctx->mcu = mcu; in khadas_mcu_fan_probe()
94 dev->parent->of_node, "khadas-mcu-fan", ctx, in khadas_mcu_fan_probe()
98 dev_err(dev, "Failed to register khadas-mcu-fan as cooling device: %d\n", in khadas_mcu_fan_probe()
142 { .name = "khadas-mcu-fan-ctrl", },
151 .name = "khadas-mcu-fan-ctrl",
[all …]
/linux/drivers/net/wireless/mediatek/mt7601u/
H A Dmcu.c16 #include "mcu.h"
70 struct urb *urb = dev->mcu.resp.urb; in mt7601u_mcu_wait_resp()
75 if (!wait_for_completion_timeout(&dev->mcu.resp_cmpl, in mt7601u_mcu_wait_resp()
82 rxfce = get_unaligned_le32(dev->mcu.resp.buf); in mt7601u_mcu_wait_resp()
86 &dev->mcu.resp, GFP_KERNEL, in mt7601u_mcu_wait_resp()
88 &dev->mcu.resp_cmpl); in mt7601u_mcu_wait_resp()
93 dev_err(dev->dev, "Error: MCU resp urb failed:%d\n", in mt7601u_mcu_wait_resp()
100 dev_err(dev->dev, "Error: MCU resp evt:%lx seq:%hhx-%lx!\n", in mt7601u_mcu_wait_resp()
124 mutex_lock(&dev->mcu.mutex); in mt7601u_mcu_msg_send()
128 seq = ++dev->mcu.msg_seq & 0xf; in mt7601u_mcu_msg_send()
[all …]
/linux/Documentation/devicetree/bindings/thermal/
H A Dmediatek,lvts-thermal.yaml24 - mediatek,mt8188-lvts-mcu
26 - mediatek,mt8192-lvts-mcu
28 - mediatek,mt8195-lvts-mcu
41 description: LVTS reset for clearing temporary data on AP/MCU.
67 - mediatek,mt8188-lvts-mcu
69 - mediatek,mt8192-lvts-mcu
85 - mediatek,mt8195-lvts-mcu
117 compatible = "mediatek,mt8195-lvts-mcu";
/linux/Documentation/hwmon/
H A Dsg2042-mcu.rst3 Kernel driver sg2042-mcu
8 * Onboard MCU for sg2042
12 Prefix: 'sg2042-mcu'
21 This driver supprts hardware monitoring for onboard MCU with
46 (the MCU device is in i2c subsystem):
52 uptime RO Seconds after the MCU is powered
69 data in ``/sys/kernel/debug/sg2042-mcu/*/``.
74 firmware_version 0x%02x firmware version of the MCU
77 mcu_type %d type of the MCU: 0 is STM32, 1 is GD32
/linux/Documentation/devicetree/bindings/hwmon/
H A Dnsa320-mcu.txt5 - compatible : "zyxel,nsa320-mcu"
6 - data-gpios : The GPIO pin connected to the data line on the MCU
7 - clk-gpios : The GPIO pin connected to the clock line on the MCU
8 - act-gpios : The GPIO pin connected to the active line on the MCU
13 compatible = "zyxel,nsa320-mcu";
/linux/drivers/net/ethernet/mediatek/
H A Dmtk_wed_mcu.c69 wait_event_timeout(wo->mcu.wait, !skb_queue_empty(&wo->mcu.res_q), in mtk_wed_mcu_get_response()
71 return skb_dequeue(&wo->mcu.res_q); in mtk_wed_mcu_get_response()
76 skb_queue_tail(&wo->mcu.res_q, skb); in mtk_wed_mcu_rx_event()
77 wake_up(&wo->mcu.wait); in mtk_wed_mcu_rx_event()
140 wo->mcu.timeout = 20 * HZ; in mtk_wed_mcu_skb_send_msg()
147 u16 seq = ++wo->mcu.seq; in mtk_wed_mcu_skb_send_msg()
150 seq = ++wo->mcu.seq; in mtk_wed_mcu_skb_send_msg()
202 mutex_lock(&wo->mcu.mutex); in mtk_wed_mcu_send_msg()
208 expires = jiffies + wo->mcu.timeout; in mtk_wed_mcu_send_msg()
216 mutex_unlock(&wo->mcu.mutex); in mtk_wed_mcu_send_msg()
[all …]
/linux/arch/arm64/boot/dts/ti/
H A Dk3-am62a.dtsi84 /* MCU Domain Range */
86 <0x00 0x79000000 0x00 0x79000000 0x00 0x00008000>, /* MCU R5 ATCM */
87 <0x00 0x79020000 0x00 0x79020000 0x00 0x00008000>, /* MCU R5 BTCM */
88 <0x00 0x79100000 0x00 0x79100000 0x00 0x00040000>, /* MCU R5 IRAM0 */
89 <0x00 0x79140000 0x00 0x79140000 0x00 0x00040000>, /* MCU R5 IRAM1 */
103 <0x00 0x79000000 0x00 0x79000000 0x00 0x00008000>, /* MCU R5 ATCM */
104 <0x00 0x79020000 0x00 0x79020000 0x00 0x00008000>, /* MCU R5 BTCM */
105 <0x00 0x79100000 0x00 0x79100000 0x00 0x00040000>, /* MCU IRAM0 */
106 <0x00 0x79140000 0x00 0x79140000 0x00 0x00040000>; /* MCU IRAM1 */
126 #include "k3-am62a-mcu.dtsi"
/linux/Documentation/devicetree/bindings/firmware/
H A Dcznic,turris-omnia-mcu.yaml4 $id: http://devicetree.org/schemas/firmware/cznic,turris-omnia-mcu.yaml#
7 title: CZ.NIC's Turris Omnia MCU
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
74 compatible = "cznic,turris-omnia-mcu";
/linux/drivers/mfd/
H A Dkhadas-mcu.c12 #include <linux/mfd/khadas-mcu.h>
80 { .name = "khadas-mcu-fan-ctrl", },
84 { .name = "khadas-mcu-user-mem", },
126 { .compatible = "khadas,mcu", },
134 .name = "khadas-mcu-core",
141 MODULE_DESCRIPTION("Khadas MCU core driver");
/linux/Documentation/ABI/testing/
H A Dsysfs-bus-i2c-devices-turris-omnia-mcu7 Only available if board information is burned in the MCU (older
20 Only available if board information is burned in the MCU (older
35 - ``mcu`` makes the button press event be handled by the MCU to
63 MCU firmware is too old, this file reads 0x0.
110 Only available if board information is burned in the MCU (older
/linux/Documentation/devicetree/bindings/mfd/
H A Dkhadas,mcu.yaml4 $id: http://devicetree.org/schemas/mfd/khadas,mcu.yaml#
20 - khadas,mcu # MCU revision is discoverable
40 compatible = "khadas,mcu";
/linux/Documentation/devicetree/bindings/net/
H A Dti,cc1352p7.yaml7 title: Texas Instruments Simplelink CC1352P7 wireless MCU
10 The CC1352P7 MCU can be connected via SPI or UART.
21 - description: high-frequency main system (MCU and peripherals) clock
50 mcu {

12345678910>>...12