Skip to content

Commit f811423

Browse files
committed
Adding Pimidi kernel module.
Signed-off-by: Giedrius Trainavičius <[email protected]>
1 parent 57b528e commit f811423

File tree

11 files changed

+1128
-0
lines changed

11 files changed

+1128
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
203203
pifi-dac-zero.dtbo \
204204
pifi-mini-210.dtbo \
205205
piglow.dtbo \
206+
pimidi.dtbo \
206207
pineboards-hat-ai.dtbo \
207208
pineboards-hatdrive-poe-plus.dtbo \
208209
piscreen.dtbo \
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Pimidi Linux kernel module.
3+
* Copyright (C) 2017-2024 Vilniaus Blokas UAB, https://blokas.io/
4+
*
5+
* This program is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License
7+
* as published by the Free Software Foundation; version 2 of the
8+
* License.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18+
* MA 02110-1301, USA.
19+
*/
20+
21+
/dts-v1/;
22+
/plugin/;
23+
24+
#include <dt-bindings/gpio/gpio.h>
25+
#include <dt-bindings/interrupt-controller/irq.h>
26+
27+
/ {
28+
compatible = "brcm,bcm2708";
29+
30+
fragment@0 {
31+
target = <&i2c_arm>;
32+
__overlay__ {
33+
status = "okay";
34+
clock-frequency=<1000000>;
35+
36+
pimidi_ctrl: pimidi_ctrl@20 {
37+
compatible = "blokaslabs,pimidi";
38+
39+
reg = <0x20>;
40+
status = "okay";
41+
42+
interrupt-parent = <&gpio>;
43+
interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
44+
interrupt-names = "data_ready";
45+
interrupt-controller;
46+
#interrupt-cells = <2>;
47+
48+
data-ready-gpios = <&gpio 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
49+
reset-gpios = <&gpio 22 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
50+
};
51+
};
52+
};
53+
54+
__overrides__ {
55+
sel = <&pimidi_ctrl>,"reg:0{0=0x20,1=0x21,2=0x22,3=0x23}",
56+
<&pimidi_ctrl>,"data-ready-gpios:4{0=23,1=5,2=6,3=27}",
57+
<&pimidi_ctrl>,"interrupts:0{0=23,1=5,2=6,3=27}";
58+
};
59+
};

arch/arm/configs/bcm2709_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,7 @@ CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m
10581058
CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m
10591059
CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m
10601060
CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m
1061+
CONFIG_SND_PIMIDI=m
10611062
CONFIG_SND_PISOUND=m
10621063
CONFIG_SND_DACBERRY400=m
10631064
CONFIG_SND_SOC_AD193X_SPI=m

arch/arm/configs/bcm2711_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m
10831083
CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m
10841084
CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m
10851085
CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m
1086+
CONFIG_SND_PIMIDI=m
10861087
CONFIG_SND_PISOUND=m
10871088
CONFIG_SND_DACBERRY400=m
10881089
CONFIG_SND_SOC_AD193X_SPI=m

arch/arm/configs/bcmrpi_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,7 @@ CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m
10521052
CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m
10531053
CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m
10541054
CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m
1055+
CONFIG_SND_PIMIDI=m
10551056
CONFIG_SND_PISOUND=m
10561057
CONFIG_SND_SOC_AD193X_SPI=m
10571058
CONFIG_SND_SOC_AD193X_I2C=m

arch/arm64/configs/bcm2711_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,7 @@ CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m
11261126
CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m
11271127
CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m
11281128
CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m
1129+
CONFIG_SND_PIMIDI=m
11291130
CONFIG_SND_PISOUND=m
11301131
CONFIG_SND_DACBERRY400=m
11311132
CONFIG_SND_DESIGNWARE_I2S=m

arch/arm64/configs/bcm2712_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,7 @@ CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m
11291129
CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m
11301130
CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m
11311131
CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m
1132+
CONFIG_SND_PIMIDI=m
11321133
CONFIG_SND_PISOUND=m
11331134
CONFIG_SND_DACBERRY400=m
11341135
CONFIG_SND_DESIGNWARE_I2S=m

arch/arm64/configs/bcmrpi3_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,7 @@ CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m
10251025
CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m
10261026
CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m
10271027
CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m
1028+
CONFIG_SND_PIMIDI=m
10281029
CONFIG_SND_PISOUND=m
10291030
CONFIG_SND_DACBERRY400=m
10301031
CONFIG_SND_SOC_AD193X_SPI=m

sound/drivers/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,14 @@ config SND_AC97_POWER_SAVE_DEFAULT
263263

264264
See SND_AC97_POWER_SAVE for more details.
265265

266+
config SND_PIMIDI
267+
tristate "Pimidi driver"
268+
depends on SND_SEQUENCER && CRC8
269+
select SND_RAWMIDI
270+
help
271+
Say Y here to include support for Blokas Pimidi.
272+
273+
To compile this driver as a module, choose M here: the module
274+
will be called snd-pimidi.
275+
266276
endif # SND_DRIVERS

sound/drivers/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ snd-aloop-objs := aloop.o
99
snd-mtpav-objs := mtpav.o
1010
snd-mts64-objs := mts64.o
1111
snd-pcmtest-objs := pcmtest.o
12+
snd-pimidi-objs := pimidi.o
1213
snd-portman2x4-objs := portman2x4.o
1314
snd-serial-u16550-objs := serial-u16550.o
1415
snd-serial-generic-objs := serial-generic.o
@@ -23,6 +24,7 @@ obj-$(CONFIG_SND_SERIAL_U16550) += snd-serial-u16550.o
2324
obj-$(CONFIG_SND_SERIAL_GENERIC) += snd-serial-generic.o
2425
obj-$(CONFIG_SND_MTPAV) += snd-mtpav.o
2526
obj-$(CONFIG_SND_MTS64) += snd-mts64.o
27+
obj-$(CONFIG_SND_PIMIDI) += snd-pimidi.o
2628
obj-$(CONFIG_SND_PORTMAN2X4) += snd-portman2x4.o
2729

2830
obj-$(CONFIG_SND) += opl3/ opl4/ mpu401/ vx/ pcsp/

0 commit comments

Comments
 (0)