aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tas5825m-module/dts.patch80
-rw-r--r--tas5825m-module/tas5825m.c4
2 files changed, 20 insertions, 64 deletions
diff --git a/tas5825m-module/dts.patch b/tas5825m-module/dts.patch
index 6d48367..f6c3ba8 100644
--- a/tas5825m-module/dts.patch
+++ b/tas5825m-module/dts.patch
@@ -1,12 +1,7 @@
--- bcm2837-rpi-3-b-plus.orig.dts
+++ bcm2837-rpi-3-b-plus.rpi-amp.dts
-@@ -84,17 +84,17 @@
- mailbox@7e00b880 {
- compatible = "brcm,bcm2835-mbox";
- reg = <0x7e00b880 0x40>;
- interrupts = <0x00 0x01>;
- #mbox-cells = <0x00>;
- phandle = <0x1b>;
+@@ -94,7 +94,7 @@
+ phandle = <0x1c>;
};
- gpio@7e200000 {
@@ -14,41 +9,20 @@
compatible = "brcm,bcm2835-gpio";
reg = <0x7e200000 0xb4>;
interrupts = <0x02 0x11 0x02 0x12 0x02 0x13 0x02 0x14>;
- gpio-controller;
- #gpio-cells = <0x02>;
- interrupt-controller;
- #interrupt-cells = <0x02>;
- gpio-ranges = <0x06 0x00 0x00 0x36>;
-@@ -340,16 +340,22 @@
- brcm,pins = <0x06>;
- brcm,function = <0x01>;
- };
-
- alt0 {
- brcm,pins = <0x04 0x05 0x07 0x08 0x09 0x0a 0x0b>;
+@@ -385,6 +385,11 @@
brcm,function = <0x04>;
+ phandle = <0x47>;
};
+
+ i2s_alt0: i2s_alt0 {
+ brcm,pins = < 18 19 20 21 >;
+ brcm,function = < 0x04 >;
+ };
-+
};
serial@7e201000 {
- compatible = "arm,pl011\0arm,primecell";
- reg = <0x7e201000 0x200>;
- interrupts = <0x02 0x19>;
- clocks = <0x07 0x13 0x07 0x14>;
- clock-names = "uartclk\0apb_pclk";
-@@ -373,23 +379,26 @@
- status = "okay";
- dmas = <0x0c 0x0d>;
- dma-names = "rx-tx";
- pinctrl-names = "default";
- pinctrl-0 = <0x0d>;
- bus-width = <0x04>;
+@@ -421,13 +426,16 @@
+ phandle = <0x4a>;
};
- i2s@7e203000 {
@@ -63,23 +37,13 @@
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s_alt0>;
+ status = "okay";
+ phandle = <0x4b>;
};
- spi@7e204000 {
- compatible = "brcm,bcm2835-spi";
- reg = <0x7e204000 0x200>;
- interrupts = <0x02 0x16>;
- clocks = <0x07 0x14>;
- #address-cells = <0x01>;
-@@ -532,16 +541,23 @@
- interrupts = <0x02 0x15>;
- clocks = <0x07 0x14>;
- #address-cells = <0x01>;
- #size-cells = <0x00>;
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <0x16>;
+@@ -623,6 +631,13 @@
+ pinctrl-0 = <0x17>;
clock-frequency = <0x186a0>;
+ phandle = <0x57>;
+
+ tas5825m: tas5825m@4c {
+ compatible = "ti,tas5825m";
@@ -90,34 +54,26 @@
};
usb@7e980000 {
- compatible = "brcm,bcm2835-usb";
- reg = <0x7e980000 0x10000>;
- interrupts = <0x01 0x09>;
- #address-cells = <0x01>;
- #size-cells = <0x00>;
-@@ -868,9 +884,25 @@
- reset-gpios = <0x0b 0x01 0x01>;
- phandle = <0x15>;
- };
-
- memory@0 {
- device_type = "memory";
+@@ -980,6 +995,22 @@
reg = <0x00 0x40000000>;
};
-+
+
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "tas5825m";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&dailink0_master>;
+ simple-audio-card,frame-master = <&dailink0_master>;
-+
++
+ dailink0_master: simple-audio-card,cpu {
+ sound-dai = <&i2s0>;
+ };
-+
++
+ simple-audio-card,codec {
+ sound-dai = <&tas5825m>;
+ };
+ };
- };
++
+ __symbols__ {
+ rmem = "/reserved-memory";
+ cma = "/reserved-memory/linux,cma";
diff --git a/tas5825m-module/tas5825m.c b/tas5825m-module/tas5825m.c
index 0494653..f2d6786 100644
--- a/tas5825m-module/tas5825m.c
+++ b/tas5825m-module/tas5825m.c
@@ -240,7 +240,7 @@ static const struct regmap_config tas5825m_regmap = {
.cache_type = REGCACHE_RBTREE,
};
-static int tas5825m_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
+static int tas5825m_i2c_probe(struct i2c_client *i2c)
{
struct device *dev = &i2c->dev;
struct tas5825m_priv *tas5825m;
@@ -295,7 +295,7 @@ static void tas5825m_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id tas5825m_i2c_ids[] = {
- { "tas5825m", 0 },
+ { "tas5825m" },
{ }
};
MODULE_DEVICE_TABLE(i2c, tas5825m_i2c_ids);