summaryrefslogtreecommitdiff
path: root/target/arm/raspberry-pi/patches/3.18.5/0001-add-support-for-rpi-proto-hardware.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/arm/raspberry-pi/patches/3.18.5/0001-add-support-for-rpi-proto-hardware.patch')
-rw-r--r--target/arm/raspberry-pi/patches/3.18.5/0001-add-support-for-rpi-proto-hardware.patch49
1 files changed, 38 insertions, 11 deletions
diff --git a/target/arm/raspberry-pi/patches/3.18.5/0001-add-support-for-rpi-proto-hardware.patch b/target/arm/raspberry-pi/patches/3.18.5/0001-add-support-for-rpi-proto-hardware.patch
index ed5e96bef..5d252034a 100644
--- a/target/arm/raspberry-pi/patches/3.18.5/0001-add-support-for-rpi-proto-hardware.patch
+++ b/target/arm/raspberry-pi/patches/3.18.5/0001-add-support-for-rpi-proto-hardware.patch
@@ -1,4 +1,4 @@
-From 7174c08bd5f4e4976259c7a0894d302acc67321e Mon Sep 17 00:00:00 2001
+From ddce02de6ff1d13503f66bb08b971ff532b89b43 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbrodkorb@conet.de>
Date: Mon, 2 Feb 2015 11:08:33 +0100
Subject: [PATCH] add support for rpi-proto hardware
@@ -10,12 +10,12 @@ kernel. Patch works fine for our embedded system.
Signed-off-by: Waldemar Brodkorb <wbrodkorb@conet.de>
---
arch/arm/boot/dts/Makefile | 1 +
- arch/arm/boot/dts/rpi-proto-overlay.dts | 34 +++++++++
+ arch/arm/boot/dts/rpi-proto-overlay.dts | 39 ++++++++
arch/arm/mach-bcm2708/bcm2708.c | 20 +++++
sound/soc/bcm/Kconfig | 8 ++
sound/soc/bcm/Makefile | 2 +
- sound/soc/bcm/rpi-proto.c | 130 ++++++++++++++++++++++++++++++++
- 6 files changed, 195 insertions(+)
+ sound/soc/bcm/rpi-proto.c | 152 ++++++++++++++++++++++++++++++++
+ 6 files changed, 222 insertions(+)
create mode 100644 arch/arm/boot/dts/rpi-proto-overlay.dts
create mode 100644 sound/soc/bcm/rpi-proto.c
@@ -33,10 +33,10 @@ index 1b66478..7171eb6 100644
dtb-$(CONFIG_BCM2708_DT) += pps-gpio-overlay.dtb
diff --git a/arch/arm/boot/dts/rpi-proto-overlay.dts b/arch/arm/boot/dts/rpi-proto-overlay.dts
new file mode 100644
-index 0000000..984545b
+index 0000000..2029930
--- /dev/null
+++ b/arch/arm/boot/dts/rpi-proto-overlay.dts
-@@ -0,0 +1,34 @@
+@@ -0,0 +1,39 @@
+// Definitions for Rpi-Proto
+/dts-v1/;
+/plugin/;
@@ -47,7 +47,7 @@ index 0000000..984545b
+ fragment@0 {
+ target = <&sound>;
+ __overlay__ {
-+ compatible = "rpi-proto";
++ compatible = "rpi,rpi-proto";
+ i2s-controller = <&i2s>;
+ status = "okay";
+ };
@@ -61,11 +61,16 @@ index 0000000..984545b
+ };
+
+ fragment@2 {
-+ target-path = "/";
++ target = <&i2c1>;
+ __overlay__ {
-+ wm8731-codec {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ status = "okay";
++
++ wm8731@1a {
+ #sound-dai-cells = <0>;
+ compatible = "wlf,wm8731";
++ reg = <0x1a>;
+ status = "okay";
+ };
+ };
@@ -148,10 +153,10 @@ index 17ea2b0..883241b 100644
obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
diff --git a/sound/soc/bcm/rpi-proto.c b/sound/soc/bcm/rpi-proto.c
new file mode 100644
-index 0000000..70b0166
+index 0000000..cdc8b51
--- /dev/null
+++ b/sound/soc/bcm/rpi-proto.c
-@@ -0,0 +1,130 @@
+@@ -0,0 +1,152 @@
+/*
+ * ASoC driver for PROTO AudioCODEC (with a WM8731)
+ * connected to a Raspberry Pi
@@ -253,6 +258,21 @@ index 0000000..70b0166
+ int ret = 0;
+
+ snd_rpi_proto.dev = &pdev->dev;
++
++ if (pdev->dev.of_node) {
++ struct device_node *i2s_node;
++ struct snd_soc_dai_link *dai = &snd_rpi_proto_dai[0];
++ i2s_node = of_parse_phandle(pdev->dev.of_node,
++ "i2s-controller", 0);
++
++ if (i2s_node) {
++ dai->cpu_dai_name = NULL;
++ dai->cpu_of_node = i2s_node;
++ dai->platform_name = NULL;
++ dai->platform_of_node = i2s_node;
++ }
++ }
++
+ ret = snd_soc_register_card(&snd_rpi_proto);
+ if (ret) {
+ dev_err(&pdev->dev,
@@ -268,10 +288,17 @@ index 0000000..70b0166
+ return snd_soc_unregister_card(&snd_rpi_proto);
+}
+
++static const struct of_device_id snd_rpi_proto_of_match[] = {
++ { .compatible = "rpi,rpi-proto", },
++ {},
++};
++MODULE_DEVICE_TABLE(of, snd_rpi_proto_of_match);
++
+static struct platform_driver snd_rpi_proto_driver = {
+ .driver = {
+ .name = "snd-rpi-proto",
+ .owner = THIS_MODULE,
++ .of_match_table = snd_rpi_proto_of_match,
+ },
+ .probe = snd_rpi_proto_probe,
+ .remove = snd_rpi_proto_remove,