From 992c386fc2f7dc8f694f22c5510411116f5f4953 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 7 Sep 2016 20:15:23 +0100 Subject: [PATCH 1/4] linux: update to linux-4.7.3 --- packages/linux/package.mk | 2 +- .../patches/{4.7.2 => 4.7.3}/linux-003-no_dev_console.patch | 0 .../{4.7.2 => 4.7.3}/linux-004-fix-build-with-gcc-5.patch | 0 .../{4.7.2 => 4.7.3}/linux-051-ouya_controller_support.patch | 0 .../{4.7.2 => 4.7.3}/linux-052-XBOX_remote_support.patch | 0 .../{4.7.2 => 4.7.3}/linux-053-spinelplus-remote-0.2.patch | 0 ...ton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch | 0 ...57-Removed-MCE-customer-code-restriction-in-rc6-decode.patch | 0 .../linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch | 0 .../{4.7.2 => 4.7.3}/linux-062-imon_pad_ignore_diagonal.patch | 0 .../linux-203-stb0899_enable_low_symbol_rate.patch | 0 .../{4.7.2 => 4.7.3}/linux-212-mantis_stb0899_faster_lock.patch | 0 .../patches/{4.7.2 => 4.7.3}/linux-221-ddbridge-features.patch | 0 .../{4.7.2 => 4.7.3}/linux-222-stb0899_signal_quality.patch | 0 .../{4.7.2 => 4.7.3}/linux-227-ds3000-invalid-symbol-rate.patch | 0 .../{4.7.2 => 4.7.3}/linux-231-Terratec-Cinergy-S2-Rev.3.patch | 0 .../linux-950-saa716x_PCIe_interface_chipset.patch.todo | 0 ...990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch | 0 ...x-999-i915-extend-fake-hdmi-live-status-to-valley-view.patch | 0 .../linux-999-i915-implement-passthrough-colors.patch | 0 .../{4.7.2 => 4.7.3}/linux-999-i915-use-legacy-turbo.patch | 0 .../linux-999-partly-revert-media-rc-core.patch | 0 ...999.02-0001-pm-disable-async-suspend-resume-by-default.patch | 0 ...5-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch | 0 24 files changed, 1 insertion(+), 1 deletion(-) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-003-no_dev_console.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-004-fix-build-with-gcc-5.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-051-ouya_controller_support.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-052-XBOX_remote_support.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-053-spinelplus-remote-0.2.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-062-imon_pad_ignore_diagonal.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-203-stb0899_enable_low_symbol_rate.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-212-mantis_stb0899_faster_lock.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-221-ddbridge-features.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-222-stb0899_signal_quality.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-227-ds3000-invalid-symbol-rate.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-231-Terratec-Cinergy-S2-Rev.3.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-950-saa716x_PCIe_interface_chipset.patch.todo (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-999-i915-extend-fake-hdmi-live-status-to-valley-view.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-999-i915-implement-passthrough-colors.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-999-i915-use-legacy-turbo.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-999-partly-revert-media-rc-core.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-999.02-0001-pm-disable-async-suspend-resume-by-default.patch (100%) rename packages/linux/patches/{4.7.2 => 4.7.3}/linux-999.05-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch (100%) diff --git a/packages/linux/package.mk b/packages/linux/package.mk index ca46586b72..5564168a8b 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -59,7 +59,7 @@ case "$LINUX" in PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced" ;; *) - PKG_VERSION="4.7.2" + PKG_VERSION="4.7.3" PKG_URL="http://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz" ;; esac diff --git a/packages/linux/patches/4.7.2/linux-003-no_dev_console.patch b/packages/linux/patches/4.7.3/linux-003-no_dev_console.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-003-no_dev_console.patch rename to packages/linux/patches/4.7.3/linux-003-no_dev_console.patch diff --git a/packages/linux/patches/4.7.2/linux-004-fix-build-with-gcc-5.patch b/packages/linux/patches/4.7.3/linux-004-fix-build-with-gcc-5.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-004-fix-build-with-gcc-5.patch rename to packages/linux/patches/4.7.3/linux-004-fix-build-with-gcc-5.patch diff --git a/packages/linux/patches/4.7.2/linux-051-ouya_controller_support.patch b/packages/linux/patches/4.7.3/linux-051-ouya_controller_support.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-051-ouya_controller_support.patch rename to packages/linux/patches/4.7.3/linux-051-ouya_controller_support.patch diff --git a/packages/linux/patches/4.7.2/linux-052-XBOX_remote_support.patch b/packages/linux/patches/4.7.3/linux-052-XBOX_remote_support.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-052-XBOX_remote_support.patch rename to packages/linux/patches/4.7.3/linux-052-XBOX_remote_support.patch diff --git a/packages/linux/patches/4.7.2/linux-053-spinelplus-remote-0.2.patch b/packages/linux/patches/4.7.3/linux-053-spinelplus-remote-0.2.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-053-spinelplus-remote-0.2.patch rename to packages/linux/patches/4.7.3/linux-053-spinelplus-remote-0.2.patch diff --git a/packages/linux/patches/4.7.2/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch b/packages/linux/patches/4.7.3/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch rename to packages/linux/patches/4.7.3/linux-054-nuvoton_revert_d7b290a1056c5564eec8a1b169c6e84ff3.6.114c13.patch diff --git a/packages/linux/patches/4.7.2/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch b/packages/linux/patches/4.7.3/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch rename to packages/linux/patches/4.7.3/linux-057-Removed-MCE-customer-code-restriction-in-rc6-decode.patch diff --git a/packages/linux/patches/4.7.2/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch b/packages/linux/patches/4.7.3/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch rename to packages/linux/patches/4.7.3/linux-058.05-hid_sony-add_autorepeat_for_PS3_remotes.patch diff --git a/packages/linux/patches/4.7.2/linux-062-imon_pad_ignore_diagonal.patch b/packages/linux/patches/4.7.3/linux-062-imon_pad_ignore_diagonal.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-062-imon_pad_ignore_diagonal.patch rename to packages/linux/patches/4.7.3/linux-062-imon_pad_ignore_diagonal.patch diff --git a/packages/linux/patches/4.7.2/linux-203-stb0899_enable_low_symbol_rate.patch b/packages/linux/patches/4.7.3/linux-203-stb0899_enable_low_symbol_rate.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-203-stb0899_enable_low_symbol_rate.patch rename to packages/linux/patches/4.7.3/linux-203-stb0899_enable_low_symbol_rate.patch diff --git a/packages/linux/patches/4.7.2/linux-212-mantis_stb0899_faster_lock.patch b/packages/linux/patches/4.7.3/linux-212-mantis_stb0899_faster_lock.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-212-mantis_stb0899_faster_lock.patch rename to packages/linux/patches/4.7.3/linux-212-mantis_stb0899_faster_lock.patch diff --git a/packages/linux/patches/4.7.2/linux-221-ddbridge-features.patch b/packages/linux/patches/4.7.3/linux-221-ddbridge-features.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-221-ddbridge-features.patch rename to packages/linux/patches/4.7.3/linux-221-ddbridge-features.patch diff --git a/packages/linux/patches/4.7.2/linux-222-stb0899_signal_quality.patch b/packages/linux/patches/4.7.3/linux-222-stb0899_signal_quality.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-222-stb0899_signal_quality.patch rename to packages/linux/patches/4.7.3/linux-222-stb0899_signal_quality.patch diff --git a/packages/linux/patches/4.7.2/linux-227-ds3000-invalid-symbol-rate.patch b/packages/linux/patches/4.7.3/linux-227-ds3000-invalid-symbol-rate.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-227-ds3000-invalid-symbol-rate.patch rename to packages/linux/patches/4.7.3/linux-227-ds3000-invalid-symbol-rate.patch diff --git a/packages/linux/patches/4.7.2/linux-231-Terratec-Cinergy-S2-Rev.3.patch b/packages/linux/patches/4.7.3/linux-231-Terratec-Cinergy-S2-Rev.3.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-231-Terratec-Cinergy-S2-Rev.3.patch rename to packages/linux/patches/4.7.3/linux-231-Terratec-Cinergy-S2-Rev.3.patch diff --git a/packages/linux/patches/4.7.2/linux-950-saa716x_PCIe_interface_chipset.patch.todo b/packages/linux/patches/4.7.3/linux-950-saa716x_PCIe_interface_chipset.patch.todo similarity index 100% rename from packages/linux/patches/4.7.2/linux-950-saa716x_PCIe_interface_chipset.patch.todo rename to packages/linux/patches/4.7.3/linux-950-saa716x_PCIe_interface_chipset.patch.todo diff --git a/packages/linux/patches/4.7.2/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch b/packages/linux/patches/4.7.3/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch rename to packages/linux/patches/4.7.3/linux-990.06-hda-Avoid-outputting-HDMI-audio-before-prepare-.patch diff --git a/packages/linux/patches/4.7.2/linux-999-i915-extend-fake-hdmi-live-status-to-valley-view.patch b/packages/linux/patches/4.7.3/linux-999-i915-extend-fake-hdmi-live-status-to-valley-view.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-999-i915-extend-fake-hdmi-live-status-to-valley-view.patch rename to packages/linux/patches/4.7.3/linux-999-i915-extend-fake-hdmi-live-status-to-valley-view.patch diff --git a/packages/linux/patches/4.7.2/linux-999-i915-implement-passthrough-colors.patch b/packages/linux/patches/4.7.3/linux-999-i915-implement-passthrough-colors.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-999-i915-implement-passthrough-colors.patch rename to packages/linux/patches/4.7.3/linux-999-i915-implement-passthrough-colors.patch diff --git a/packages/linux/patches/4.7.2/linux-999-i915-use-legacy-turbo.patch b/packages/linux/patches/4.7.3/linux-999-i915-use-legacy-turbo.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-999-i915-use-legacy-turbo.patch rename to packages/linux/patches/4.7.3/linux-999-i915-use-legacy-turbo.patch diff --git a/packages/linux/patches/4.7.2/linux-999-partly-revert-media-rc-core.patch b/packages/linux/patches/4.7.3/linux-999-partly-revert-media-rc-core.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-999-partly-revert-media-rc-core.patch rename to packages/linux/patches/4.7.3/linux-999-partly-revert-media-rc-core.patch diff --git a/packages/linux/patches/4.7.2/linux-999.02-0001-pm-disable-async-suspend-resume-by-default.patch b/packages/linux/patches/4.7.3/linux-999.02-0001-pm-disable-async-suspend-resume-by-default.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-999.02-0001-pm-disable-async-suspend-resume-by-default.patch rename to packages/linux/patches/4.7.3/linux-999.02-0001-pm-disable-async-suspend-resume-by-default.patch diff --git a/packages/linux/patches/4.7.2/linux-999.05-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch b/packages/linux/patches/4.7.3/linux-999.05-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch similarity index 100% rename from packages/linux/patches/4.7.2/linux-999.05-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch rename to packages/linux/patches/4.7.3/linux-999.05-eMMC-Don-t-initialize-partitions-on-RPMB-flagged-are.patch From 0ed9b3f88ed42ee09d4dc6468bc1d2b94f33102c Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 7 Sep 2016 13:24:17 +0100 Subject: [PATCH 2/4] RBP: Update to firmware 931aa12 --- packages/graphics/bcm2835-driver/package.mk | 2 +- packages/tools/bcm2835-bootloader/package.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graphics/bcm2835-driver/package.mk b/packages/graphics/bcm2835-driver/package.mk index 06c53218f9..3919c8797f 100644 --- a/packages/graphics/bcm2835-driver/package.mk +++ b/packages/graphics/bcm2835-driver/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="bcm2835-driver" -PKG_VERSION="d0bc6ce" +PKG_VERSION="931aa12" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="nonfree" diff --git a/packages/tools/bcm2835-bootloader/package.mk b/packages/tools/bcm2835-bootloader/package.mk index 85ac6f108b..524030ee70 100644 --- a/packages/tools/bcm2835-bootloader/package.mk +++ b/packages/tools/bcm2835-bootloader/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="bcm2835-bootloader" -PKG_VERSION="d0bc6ce" +PKG_VERSION="931aa12" PKG_REV="1" PKG_ARCH="arm" PKG_LICENSE="nonfree" From 67298338bf421c53be466471f09f921688b4f647 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 7 Sep 2016 14:23:46 +0100 Subject: [PATCH 3/4] RPi/RPi2: update linux support patches for linux 4.7.3 --- .../patches/linux/linux-01-RPi_support.patch | 4199 ++++++++++++----- .../patches/linux/linux-01-RPi_support.patch | 4199 ++++++++++++----- tools/RPi/rpi-linux-rebase.sh | 17 +- 3 files changed, 5993 insertions(+), 2422 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 97146135f0..bf3e6409b6 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support.patch @@ -1,7 +1,7 @@ -From b3a991b03f20c70e2a9b9578596a5d3d74e2ed7c Mon Sep 17 00:00:00 2001 +From c5b275dbc5ea9daa14e9e5d2b81415998fdf5533 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 27 Apr 2016 17:43:28 +0100 -Subject: [PATCH 001/119] Revert "SUNRPC: Make NFS swap work with multipath" +Subject: [PATCH 001/147] Revert "SUNRPC: Make NFS swap work with multipath" This reverts commit 15001e5a7e1e207b6bd258cd8f187814cd15b6dc. --- @@ -95,10 +95,10 @@ index 2808d550d2730ff8e36b6d8c072c65e1631064c4..b362c2f099941c1f3388507983ffbdd1 EXPORT_SYMBOL_GPL(rpc_clnt_swap_deactivate); #endif /* CONFIG_SUNRPC_SWAP */ -From cef4817e002053fa71beaa23ee75a03b1084e217 Mon Sep 17 00:00:00 2001 +From 6ef1f7bd7fa3f37e30494c38020c51957b97dd2a Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 002/119] smsx95xx: fix crimes against truesize +Subject: [PATCH 002/147] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -145,10 +145,10 @@ index dc989a8b5afbd62b07cd65a2fa5edde67d3cc5fb..116680e3089f16e1e3e9113a3b93e62c usbnet_skb_return(dev, ax_skb); } -From 037225865f0c5833f249ea1217347d0399741441 Mon Sep 17 00:00:00 2001 +From 6e4626e71005fdbe48baa63f0b7a4ba40d19867a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 Apr 2015 16:58:45 +0100 -Subject: [PATCH 003/119] smsc95xx: Disable turbo mode by default +Subject: [PATCH 003/147] smsc95xx: Disable turbo mode by default --- drivers/net/usb/smsc95xx.c | 2 +- @@ -168,10 +168,10 @@ index 116680e3089f16e1e3e9113a3b93e62cb78cc1bb..aa4cb43dcd9ba83b042332bc15a4dce6 MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); -From 091c8b1d376a7fd69788110b6069b65599e7e323 Mon Sep 17 00:00:00 2001 +From d9b4b7b9cd167e8d538ee82bb316e4b427f5ebc4 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 004/119] add smsc95xx packetsize module_param +Subject: [PATCH 004/147] add smsc95xx packetsize module_param Signed-off-by: Sam Nazarko --- @@ -213,10 +213,10 @@ index aa4cb43dcd9ba83b042332bc15a4dce68affce28..889bdabd9dea6cebccc361aa4ac569d7 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From d0308a38ad9fb4fad9ed78c4df262b6359a65e81 Mon Sep 17 00:00:00 2001 +From 492e0a8c445eae74eda7a362c6eb141a98f1c7c6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 005/119] Allow mac address to be set in smsc95xx +Subject: [PATCH 005/147] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -312,10 +312,10 @@ index 889bdabd9dea6cebccc361aa4ac569d73681396b..d22a2324085fbf61fbd8920362bfc7b9 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From 241f4bafbfc3fcddb427fde34b4cc3186f0007cf Mon Sep 17 00:00:00 2001 +From 0d583a7af5886b9dabc7a4b88b64d19d6617f332 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 13:28:24 +0000 -Subject: [PATCH 006/119] serial: Take care starting a hung-up tty's port +Subject: [PATCH 006/147] serial: Take care starting a hung-up tty's port tty_port_hangup sets a port's tty field to NULL (holding the port lock), but uart_tx_stopped, called from __uart_start (with the port lock), @@ -343,10 +343,10 @@ index a3d7c0d4a03e75016023184a5fea18c91d9d8dbc..d61b4167a03205f917448d0bd71a84d0 return 0; } -From 196a0d2433fd13ec9295838d8ad95f42b534f8d5 Mon Sep 17 00:00:00 2001 +From 388620ba598719c3a9627d497f478dc586900c49 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 13:42:01 +0100 -Subject: [PATCH 007/119] vmstat: Workaround for issue where dirty page count +Subject: [PATCH 007/147] vmstat: Workaround for issue where dirty page count goes negative See: @@ -373,10 +373,10 @@ index d2da8e053210041bfcefb9e04b59d195880d2d0e..e3258dc35371ee6e528dc02ffc705570 static inline void __inc_zone_page_state(struct page *page, -From 185e4131131c921380bae165eebe91e61970d964 Mon Sep 17 00:00:00 2001 +From 0d747acc93309f54dec5a8189cd33ca4674f88ac Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 008/119] Protect __release_resource against resources without +Subject: [PATCH 008/147] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -404,10 +404,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From 77af8947810ce49be1483f4bfd1d2896bbb4bdf1 Mon Sep 17 00:00:00 2001 +From aa0b84f496a481c5e7922684ec52514a523af0ab Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 009/119] mm: Remove the PFN busy warning +Subject: [PATCH 009/147] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -432,10 +432,10 @@ index 8b3e1341b7544608cac4777a37bbd424432488e1..9dba743762508ea1cced150388afa38f goto done; } -From b2a790401ac6156038c376d4258b15f91c5f562e Mon Sep 17 00:00:00 2001 +From 251cf429c655dbd52d4f02c78f64dae50295b4ad Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 010/119] BCM2835_DT: Fix I2S register map +Subject: [PATCH 010/147] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -473,10 +473,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 5ba4658f4f37ab946cb7ef37508e49f210e1c8c2 Mon Sep 17 00:00:00 2001 +From 6cc03c1a6e001b98272b6be79c75ca7ee67b6560 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 011/119] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 011/147] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -503,10 +503,10 @@ index 72ff1d5c5de67058f4ef22bb233c41b7c737d6e3..de3b3a37a63d00cc82ae4725b2fe8584 #endif } else if (stat) { -From 8e1f6bd19cbcdcdfc1281586503de7edfc6e4a8e Mon Sep 17 00:00:00 2001 +From 2c2163f38510dfc6a2a58c6fd51fb1eaa0e28602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 012/119] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 012/147] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -635,10 +635,10 @@ index bf9cc5f2e839e845fe1ce65caa672b6212d3ffbc..3f601f98aa884b941fbb84edb349f6c4 } -From 320832a9ca9f41c77fd7c11ae87be6e03211b416 Mon Sep 17 00:00:00 2001 +From 62ea944d60c8b5c44088d3d23284e145bea0f6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 013/119] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 013/147] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -734,10 +734,10 @@ index 3f601f98aa884b941fbb84edb349f6c469b940b1..20deb282286834b1f234a65e614b8584 for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 8776ee14f1397ae851a8c86bbadb08494323a13d Mon Sep 17 00:00:00 2001 +From 2ae4221d78eb8d7b0dcd20839968ac4c34cc4d87 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 014/119] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 014/147] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -758,10 +758,10 @@ index e3c19f30f591115a823467033702ff1b232c5ebc..f4963e3c1dbcd13edb9b97e9dad65438 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From 82b90b0b4a357f44e02b57656c2acf678ac69f14 Mon Sep 17 00:00:00 2001 +From 26e4aa2cfba15991fa9d31f205a48aeeb58cc9be Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 30 Jun 2015 14:12:42 +0100 -Subject: [PATCH 015/119] serial: 8250: Don't crash when nr_uarts is 0 +Subject: [PATCH 015/147] serial: 8250: Don't crash when nr_uarts is 0 --- drivers/tty/serial/8250/8250_core.c | 2 ++ @@ -781,10 +781,10 @@ index 0fbd7c033a251e7d0cb214ed2bbd1ad1f19f0a76..00fc96497968c826978465957454ad73 for (i = 0; i < nr_uarts; i++) { struct uart_8250_port *up = &serial8250_ports[i]; -From 7eaaa312509254cd8e57c45688c97e8abf8f4e67 Mon Sep 17 00:00:00 2001 +From ce4ae437749dfd05c45c63a38097dd8fa704e5eb Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 016/119] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 016/147] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -806,10 +806,10 @@ index fa77165fab2c1348163979da507df17e7168c49b..d11e2e4ea189466e686d762cb6c6fef9 .can_sleep = false, }; -From c501d4dc7b5902d3ce5aa7fbd84a945700687283 Mon Sep 17 00:00:00 2001 +From de7c08cfe41c44e56c511c96045e667008bbc40a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 017/119] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 017/147] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -955,10 +955,10 @@ index d11e2e4ea189466e686d762cb6c6fef9111ecf8e..107ad7d58de8f8a7f55e09c9cdcf7d66 }, }; -From 46f13e55afadcc5d65377293cb0980e6644bf1a7 Mon Sep 17 00:00:00 2001 +From 947df7e8d1d221c15778c05dcf5fce8f67aa125d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 018/119] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 018/147] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -985,10 +985,10 @@ index 107ad7d58de8f8a7f55e09c9cdcf7d66fa7ab66b..644bdecbcfcb79d3b84a33769265fca5 pc->irq_data[i].irqgroup = i; -From ca462b28f55c3f42de0f025760c49aae7379c4f7 Mon Sep 17 00:00:00 2001 +From 1a86637679bcf40a2ebc7c69608b8a0849887545 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 May 2016 12:32:47 +0100 -Subject: [PATCH 019/119] pinctrl-bcm2835: Return pins to inputs when freed +Subject: [PATCH 019/147] pinctrl-bcm2835: Return pins to inputs when freed When dynamically unloading overlays, it is important that freed pins are restored to being inputs to prevent functions from being enabled in @@ -1029,10 +1029,10 @@ index 644bdecbcfcb79d3b84a33769265fca5d3d0c9e5..81a66cba2ab0f7e3ae179de7edd10122 .get_function_name = bcm2835_pmx_get_function_name, .get_function_groups = bcm2835_pmx_get_function_groups, -From d7a6f46b6efdb24d9e13bf53c4101f784fb0d000 Mon Sep 17 00:00:00 2001 +From 15cc2cbfb59418b574e29441dec58cddc650a1ae Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 020/119] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 020/147] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -1113,10 +1113,10 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 31c6e8f53d830408409252a79578a15e482feea3 Mon Sep 17 00:00:00 2001 +From 2fa140d8eec85123d4b53ad5ecd8c315b5bcc713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 021/119] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 021/147] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1174,10 +1174,10 @@ index 834d67684e205a185971c13ebc6620434eeac788..3b68a8d3501a5dcb1b4790c35d921cf5 static const char * const bcm2835_compat[] = { -From f12d50eb750065f06af1aff912190fea17628367 Mon Sep 17 00:00:00 2001 +From a7212a79653c182e84b7b26293c8a209eb4b0427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 022/119] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 022/147] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1280,10 +1280,10 @@ index 6149b27c33ad0962a19ed411055d9d05bfb252d3..43265b2847d37b3ee8f71b7528eebea1 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From d902933fe3953262146692161168dd3d182da06d Mon Sep 17 00:00:00 2001 +From 5b9c8fdcaa898f1d86600b99fbbaeabb60aa9c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:50:02 +0200 -Subject: [PATCH 023/119] bcm2835: Add support for uart1 +Subject: [PATCH 023/147] bcm2835: Add support for uart1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1340,10 +1340,10 @@ index 3b68a8d3501a5dcb1b4790c35d921cf5fa641ec7..e72e522fbc840c36a39cb6550850b3c6 static const char * const bcm2835_compat[] = { -From f87575697a12af31a6cdeb7346a4f34ced919311 Mon Sep 17 00:00:00 2001 +From 6df3c386d76162d98a99e13fd2cd16875b7d20c3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 024/119] firmware: Updated mailbox header +Subject: [PATCH 024/147] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 11 +++++++++++ @@ -1406,10 +1406,10 @@ index 3fb357193f09914fe21f8555a4b8613f74f22bc3..227a107214a02deadcca3db202da265e RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001, RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, -From 830082c887e90076ea528cdb206798e8bbfd866e Mon Sep 17 00:00:00 2001 +From 5a8600595cf8501ad8fb869a25cb2780b0a08ceb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 025/119] Main bcm2708/bcm2709 linux port +Subject: [PATCH 025/147] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -3919,10 +3919,10 @@ index 45cde8cd39f2434f5f9ec02c702a91a7f6b971c9..6a01ffa629386bdecf85e5a4736f7c27 mmc_pm_flag_t pm_caps; /* supported pm features */ -From 20230801c659dbaa835fcc5871b7f7a76743cc5e Mon Sep 17 00:00:00 2001 +From 998d313533d3147db5876f4f6efc9d45568ff7bd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 026/119] reboot: Use power off rather than busy spinning when +Subject: [PATCH 026/147] reboot: Use power off rather than busy spinning when halt is requested --- @@ -3945,10 +3945,10 @@ index 3fa867a2aae672755c6ce6448f4148c989dbf964..80dca8dcd6709034b643c6a3f35729e0 /* -From 1dfdeeaa718e08b61647d39d7cf73c8878ad8aea Mon Sep 17 00:00:00 2001 +From 884bad61e2b8c1c2620d5d0120d60bb087252898 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 11 Nov 2015 21:01:15 +0000 -Subject: [PATCH 027/119] squash: include ARCH_BCM2708 / ARCH_BCM2709 +Subject: [PATCH 027/147] squash: include ARCH_BCM2708 / ARCH_BCM2709 --- drivers/char/hw_random/Kconfig | 2 +- @@ -4125,10 +4125,10 @@ index 6a834e109f1de47e533d17e87cdc73d8ee86fc4d..c5070aec5996aafb2d9daaf75163e16a select REGMAP_MMIO help -From 71e43c8655cf530d29be6ac1158d1c89053aa53e Mon Sep 17 00:00:00 2001 +From 97adebf65f3147df5b9e86bcea2f0a2e15e6aae5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 028/119] Add dwc_otg driver +Subject: [PATCH 028/147] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -4822,10 +4822,10 @@ index 358ca8dd784fe43700ae070764fa783500a792fe..abaac7c7142d8887c1516957fc52162c return i; } diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index bee13517676f9b2f00e3cd4e3fd4185f5aaa13c9..844ed26f2743b921e5a81cca1654badde94e05cd 100644 +index 1d5fc32d06d007a6f64526a531da8ae69e8e6950..ce881480114d0f444f4b1099c713c2568b725162 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5046,7 +5046,7 @@ static void port_event(struct usb_hub *hub, int port1) +@@ -5041,7 +5041,7 @@ static void port_event(struct usb_hub *hub, int port1) if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; @@ -65154,10 +65154,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 1f1b5fbbeb7d47cb559829ce2ecc64dea3cadc40 Mon Sep 17 00:00:00 2001 +From 2afe97d206afc8a4739a446221cfbee56ff709c4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 029/119] bcm2708 framebuffer driver +Subject: [PATCH 029/147] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -68616,10 +68616,10 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 -From e3a46851101da511663fb8c1e9ace64400fb1c5a Mon Sep 17 00:00:00 2001 +From fb9cf85c8674d0353082355eb1e9dc4d724e2c3e Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 030/119] dmaengine: Add support for BCM2708 +Subject: [PATCH 030/147] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69239,10 +69239,10 @@ index 0000000000000000000000000000000000000000..99cc7fdbf543207208bf3638a0d4dbb6 + +#endif /* _PLAT_BCM2708_DMA_H */ -From 2eb0c07a4c0a2b5a3dcb47e8b2e2771faac17a11 Mon Sep 17 00:00:00 2001 +From f701bc08b01f46bfa6320fb597ae02dbee95ba3a Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 031/119] MMC: added alternative MMC driver +Subject: [PATCH 031/147] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -70989,10 +70989,10 @@ index 0000000000000000000000000000000000000000..ceb37930e167f47c9c848e8de757ad09 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From d03a7264ec92e4f59ff25dbb70fe755969411f51 Mon Sep 17 00:00:00 2001 +From 5bff3b6e188d8f84177f98ca3b835261c151df24 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 032/119] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 032/147] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -73372,10 +73372,10 @@ index 0000000000000000000000000000000000000000..d7b6b5a4e31f7aaa76470d3a79ea78a6 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From c7c7f6442e1a041ff0449fd00716fae3681d6790 Mon Sep 17 00:00:00 2001 +From a48f2a8957a3cf8d0eea65868bb9a4af508d29ab Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 May 2016 12:50:33 +0100 -Subject: [PATCH 033/119] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards +Subject: [PATCH 033/147] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards Some SD cards have been found that corrupt data when small blocks are erased. Add a quirk to indicate that ERASE should not be used, @@ -73511,10 +73511,10 @@ index eb0151bac50c1fd796f479d017bc3c3d7017c9e9..fa4e6454456747f02a10621f4f4da3ac unsigned int erase_shift; /* if erase unit is power 2 */ unsigned int pref_erase; /* in sectors */ -From 059916f5d9b5f01c9a530c6a78aa3ab25dd03acf Mon Sep 17 00:00:00 2001 +From b2c4b172ce70202b57a0e950d23eeeec95f50cdf Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 034/119] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 034/147] cma: Add vc_cma driver to enable use of CMA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -74857,10 +74857,10 @@ index 0000000000000000000000000000000000000000..be2819d5d41f9d5ed65daf8eedb94c9e + +#endif /* VC_CMA_H */ -From 7ba0eac61216f2fc6f77787bdef5f1a21dea0592 Mon Sep 17 00:00:00 2001 +From c01592db94e855932c73bcbf9bb48194e787e458 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 035/119] bcm2708: alsa sound driver +Subject: [PATCH 035/147] bcm2708: alsa sound driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -77597,10 +77597,10 @@ index 0000000000000000000000000000000000000000..af3e6eb690113fc32ce9e06bd2f0f294 + +#endif // _VC_AUDIO_DEFS_H_ -From 194cbe936e536cc4876eb6007d71d996e49f211c Mon Sep 17 00:00:00 2001 +From 70d44377b1d1c043ee604bf2e48af32dbaf9baed Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 036/119] bcm2708 vchiq driver +Subject: [PATCH 036/147] bcm2708 vchiq driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -90965,10 +90965,10 @@ index 0000000000000000000000000000000000000000..b6bfa21155e431e93bfb2c149d324371 + return vchiq_build_time; +} -From ad1a93c2808e2aebdb764dcfac75f0b43414c4cb Mon Sep 17 00:00:00 2001 +From 3185ab91ef5e15f3d66cb6e633f281dc911a54d2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 16:07:06 +0100 -Subject: [PATCH 037/119] vc_mem: Add vc_mem driver +Subject: [PATCH 037/147] vc_mem: Add vc_mem driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -91973,10 +91973,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From ecb5b0d56a6624be0b6a31bd257cf2e4418e036f Mon Sep 17 00:00:00 2001 +From 0a74a26624f275e2b8faf03b36248bea81f7f05a Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 038/119] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 038/147] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -96394,10 +96394,10 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From 971d989c31abb4fd06b79ea031ef1f87f544ffd0 Mon Sep 17 00:00:00 2001 +From d77c0664822e7bb1f7f84a17dcf8025ac5b8eb56 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 039/119] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 039/147] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -96708,10 +96708,10 @@ index 0000000000000000000000000000000000000000..911f5b7393ed48ceed8751f06967ae64 +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From dd9172e87a7c4dbabcf76b18394053200e3f55f9 Mon Sep 17 00:00:00 2001 +From 4b8feaf281d9bc26c4605e01d4d73df7a0c7c945 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 040/119] Add SMI driver +Subject: [PATCH 040/147] Add SMI driver Signed-off-by: Luke Wren --- @@ -98662,10 +98662,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From 5818b17dce756d4b6641cb9be44fce33a040f55d Mon Sep 17 00:00:00 2001 +From cb01349c580ed733d8ad12bedc9e356594198a84 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 041/119] Add SMI NAND driver +Subject: [PATCH 041/147] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -99030,10 +99030,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 7a837ee40843ef864ea0293624413502163ba296 Mon Sep 17 00:00:00 2001 +From c4b19f99a1cd44bc03ccfac3a43d8769f6f99da5 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 042/119] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 042/147] lirc: added support for RaspberryPi GPIO lirc_rpi: Use read_current_timer to determine transmitter delay. Thanks to jjmz and others See: https://github.com/raspberrypi/linux/issues/525 @@ -99896,10 +99896,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From fe2b750f71020202b9937fcc1e5ed3c7a18ca352 Mon Sep 17 00:00:00 2001 +From c7acf5288800f2976b1e19cc1098debcfadc1d1f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 043/119] Add cpufreq driver +Subject: [PATCH 043/147] Add cpufreq driver Signed-off-by: popcornmix --- @@ -100161,10 +100161,10 @@ index 0000000000000000000000000000000000000000..3eb9e9326231b08e6ee95ad486485245 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From ae77f68524aad87d4fc3aea49cc7498299fca815 Mon Sep 17 00:00:00 2001 +From 34b8059258cddf3ed033ad686ed1708e72c04868 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 044/119] Added hwmon/thermal driver for reporting core +Subject: [PATCH 044/147] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -100330,10 +100330,10 @@ index 0000000000000000000000000000000000000000..c63fb9f9d143e19612a18fe530c7b2b3 +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); -From 32df8f5f8e1725feb1050e598e8abb4b4be89160 Mon Sep 17 00:00:00 2001 +From 5410fbba7eb97934edc2efe25c9ede309b273003 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 045/119] Add Chris Boot's i2c driver +Subject: [PATCH 045/147] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100990,10 +100990,10 @@ index 0000000000000000000000000000000000000000..c9b8e5cb1702e4b20e45214d81a7a40a +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 76034201214bc189260a389df7be9399728106d8 Mon Sep 17 00:00:00 2001 +From f5f094ee0ccabb23fb21e6a65034cbaad902def3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 046/119] char: broadcom: Add vcio module +Subject: [PATCH 046/147] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -101219,10 +101219,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From d0d20dbe6324c801264548804a7c5b9b91e1f6f8 Mon Sep 17 00:00:00 2001 +From d9e4244fbe3616d0276b4769e9206c9f85ef296a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 047/119] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 047/147] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -101328,10 +101328,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..b980d531b35b9981a88356ef1c8a7b86 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From bbc37de942cdaf0d228877d68cd7142bdd5e1a6d Mon Sep 17 00:00:00 2001 +From 05c2d118d76a88e6daba0208a7aa8c82bfd2731d Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 048/119] bcm2835: add v4l2 camera device +Subject: [PATCH 048/147] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -109063,10 +109063,10 @@ index 0000000000000000000000000000000000000000..9d1d11e4a53e510c04a416d92d195a7d + +#endif /* MMAL_VCHIQ_H */ -From 94b6390e2812b2d593a3ff00b8cdceaa0bc5bbb1 Mon Sep 17 00:00:00 2001 +From faac72f00a2a9e71a576e79a36af0fc1f883492b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 049/119] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 049/147] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -109578,10 +109578,10 @@ index 0000000000000000000000000000000000000000..78c5845d2f01deb04b477327d83fa606 + return $trailer; +} -From 0e1c7da845ceb22cd786b030ac9e413cb17f0a67 Mon Sep 17 00:00:00 2001 +From b18e3551828f8b21139bc1215aac346c7b98d3ad Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 10 Aug 2015 09:49:15 +0100 -Subject: [PATCH 050/119] scripts/dtc: Update to upstream version 1.4.1 +Subject: [PATCH 050/147] scripts/dtc: Update to upstream version 1.4.1 Includes the new localfixups format. @@ -112432,10 +112432,10 @@ index ad9b05ae698b0495ecbda42ffcf4743555313a27..2595dfda020fd9e03f0beff5006f229d -#define DTC_VERSION "DTC 1.4.1-g53bf130b" +#define DTC_VERSION "DTC 1.4.1-g25efc119" -From 0aafad9829488449cd46d0166a57c94036578f3e Mon Sep 17 00:00:00 2001 +From 156a93f3d8305f601b1b8ee292b554256a48d9bd Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 051/119] BCM2708: Add core Device Tree support +Subject: [PATCH 051/147] BCM2708: Add core Device Tree support Add the bare minimum needed to boot BCM2708 from a Device Tree. @@ -112514,8 +112514,8 @@ BCM270X_DT: Use clk_core for I2C interfaces arch/arm/boot/dts/bcm2710.dtsi | 102 ++ arch/arm/boot/dts/bcm2835-rpi-cm.dts | 93 ++ arch/arm/boot/dts/bcm2835-rpi-cm.dtsi | 30 + - arch/arm/boot/dts/overlays/Makefile | 106 ++ - arch/arm/boot/dts/overlays/README | 1229 ++++++++++++++++++++ + arch/arm/boot/dts/overlays/Makefile | 105 ++ + arch/arm/boot/dts/overlays/README | 1223 ++++++++++++++++++++ .../arm/boot/dts/overlays/adau1977-adc-overlay.dts | 53 + arch/arm/boot/dts/overlays/ads1015-overlay.dts | 98 ++ arch/arm/boot/dts/overlays/ads7846-overlay.dts | 89 ++ @@ -112544,7 +112544,6 @@ BCM270X_DT: Use clk_core for I2C interfaces .../arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts | 61 + .../arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts | 37 + .../boot/dts/overlays/i2s-gpio28-31-overlay.dts | 18 + - arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts | 13 + arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 43 + .../boot/dts/overlays/iqaudio-dacplus-overlay.dts | 46 + .../overlays/iqaudio-digi-wm8804-audio-overlay.dts | 47 + @@ -112600,7 +112599,7 @@ BCM270X_DT: Use clk_core for I2C interfaces arch/arm/boot/dts/overlays/w1-gpio-overlay.dts | 39 + .../boot/dts/overlays/w1-gpio-pullup-overlay.dts | 41 + arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 + - 99 files changed, 7749 insertions(+) + 98 files changed, 7729 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b.dts create mode 100755 arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -112643,7 +112642,6 @@ BCM270X_DT: Use clk_core for I2C interfaces create mode 100644 arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts - create mode 100644 arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/iqaudio-digi-wm8804-audio-overlay.dts @@ -114511,10 +114509,10 @@ index 0000000000000000000000000000000000000000..9c4000fc686a9882b9ddde24fdcf937d +}; diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile new file mode 100644 -index 0000000000000000000000000000000000000000..7e740c894436e8fd9ed9b451e5b1f7888806922f +index 0000000000000000000000000000000000000000..e6e2bfb85fbc257ea851c9f2afa5f78a87cdc41d --- /dev/null +++ b/arch/arm/boot/dts/overlays/Makefile -@@ -0,0 +1,106 @@ +@@ -0,0 +1,105 @@ +ifeq ($(CONFIG_OF),y) + +# Overlays for the Raspberry Pi platform @@ -114557,7 +114555,6 @@ index 0000000000000000000000000000000000000000..7e740c894436e8fd9ed9b451e5b1f788 +dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo +dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo +dtbo-$(RPI_DT_OVERLAYS) += i2s-gpio28-31.dtbo -+dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo +dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dac.dtbo +dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo +dtbo-$(RPI_DT_OVERLAYS) += iqaudio-digi-wm8804-audio.dtbo @@ -114623,10 +114620,10 @@ index 0000000000000000000000000000000000000000..7e740c894436e8fd9ed9b451e5b1f788 +clean-files := *.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README new file mode 100644 -index 0000000000000000000000000000000000000000..780bf6dda5a6694cb312140329120fda3b0c2f61 +index 0000000000000000000000000000000000000000..3cc6560de2000480294688ec80bc8b26caf255d8 --- /dev/null +++ b/arch/arm/boot/dts/overlays/README -@@ -0,0 +1,1229 @@ +@@ -0,0 +1,1223 @@ +Introduction +============ + @@ -115133,12 +115130,6 @@ index 0000000000000000000000000000000000000000..780bf6dda5a6694cb312140329120fda +Params: + + -+Name: i2s-mmap -+Info: Enables mmap support in the bcm2708-i2s driver -+Load: dtoverlay=i2s-mmap -+Params: -+ -+ +Name: iqaudio-dac +Info: Configures the IQaudio DAC audio card +Load: dtoverlay=iqaudio-dac, @@ -117524,25 +117515,6 @@ index 0000000000000000000000000000000000000000..30c356d6070cc3b1dfd1d5a07dc10213 + }; + }; +}; -diff --git a/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts b/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..a11160afa4bfb2aeda5937b3b1138bb1f9b9b0f8 ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts -@@ -0,0 +1,13 @@ -+/dts-v1/; -+/plugin/; -+ -+/{ -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&i2s>; -+ __overlay__ { -+ brcm,enable-mmap; -+ }; -+ }; -+}; diff --git a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..0d35c85382bb5766b3eeb9de1bd4a94621229e4b @@ -121059,10 +121031,10 @@ index 0000000000000000000000000000000000000000..8498134fdbb3912e9ce18282b53084d8 + +}; -From 08ad6c196e2efc2181274ebf686fcf00a0277ffa Mon Sep 17 00:00:00 2001 +From bf3f1605a56696a7531fd4b0c5a9051798ab8a2c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 20:00:21 +0000 -Subject: [PATCH 052/119] BCM270X_DT: Add a .dtbo target, use for overlays +Subject: [PATCH 052/147] BCM270X_DT: Add a .dtbo target, use for overlays Change the filenames and extensions to keep the pre-DDT style of overlay (-overlay.dtb) distinct from new ones that use a @@ -121145,10 +121117,10 @@ index e7df0f5db7ec273f45b755668815ce96ba1ffe46..8f50f48329b9460b7268322ea4fd99cf # Bzip2 -From 1f191b8bb3632388ea155815b8fad006921f2ff5 Mon Sep 17 00:00:00 2001 +From ddef78ed49a7bf47a097dff8b04542bb0a70d353 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 8 Apr 2016 17:43:27 +0100 -Subject: [PATCH 053/119] BCM270X_DT: Don't generate "linux,phandle" props +Subject: [PATCH 053/147] BCM270X_DT: Don't generate "linux,phandle" props The EPAPR standard says to use "phandle" properties to store phandles, rather than the deprecated "linux,phandle" version. By default, dtc @@ -121174,10 +121146,10 @@ index 8f50f48329b9460b7268322ea4fd99cf764134ec..c1c3ceb265a3fd223b8a2a0a548ddad3 -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -From ca9e434ec3cded3fc7797577f245a0b80c56db86 Mon Sep 17 00:00:00 2001 +From e8385139248a1b537cd7cbba36ee6667ef663a38 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 054/119] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 054/147] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -121353,10 +121325,10 @@ index e5e7f2e80a54dd2f15737a3ef478287458641f6e..68086e559d963ed06a0ceb916f9b1555 /* Set LED brightness level * Must not sleep. Use brightness_set_blocking for drivers -From 8244c1243b3a8a539202e12d8c0ea9f83e7e9006 Mon Sep 17 00:00:00 2001 +From 3546b9fd0fa06f93e5543541ad20a2a4327f8528 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 055/119] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 055/147] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -121449,10 +121421,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..fa72af0c981710fe80bacf4cf6612f6d #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ -From 45ead68a64257fa9197d1982a9630b6d63a00506 Mon Sep 17 00:00:00 2001 +From 95afd5fc5890bde189a8facad85422caf978cd49 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 056/119] Speed up console framebuffer imageblit function +Subject: [PATCH 056/147] Speed up console framebuffer imageblit function Especially on platforms with a slower CPU but a relatively high framebuffer fill bandwidth, like current ARM devices, the existing @@ -121661,10 +121633,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 4d609b22de42d7a28825e8c01072a158c5d933fa Mon Sep 17 00:00:00 2001 +From ee8a19213da7d9e35eaa347eee4ee0eef598872e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 057/119] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 057/147] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) 1-wire: Add support for configuring pin for w1-gpio kernel module @@ -121914,10 +121886,10 @@ index d58594a3232492e33f1dd4babd3798b03e0f0203..feae94256256316fd9d850c3d83325af unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; -From 748bb26b92f0d95785fb5cdd2a9d45dd51f12bfe Mon Sep 17 00:00:00 2001 +From 69204bb41f50db8096f8cb0e2fe36daa8d10bed1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 058/119] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 058/147] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -121967,10 +121939,10 @@ index e0be49fc382fc339269b9be29fda59d4ad619962..9b31046d0b00c66d86c1b07003a79edb * css_tryget_online_from_dir - get corresponding css from a cgroup dentry * @dentry: directory dentry of interest -From 6dd642c1b1cc9c115d4c01efb57aa6809dd65141 Mon Sep 17 00:00:00 2001 +From 4a0d7c358be9f572951e2455ef8626881856f3a0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 059/119] config: Add default configs +Subject: [PATCH 059/147] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1288 +++++++++++++++++++++++++++++++++++ @@ -124576,10 +124548,10 @@ index 0000000000000000000000000000000000000000..da2df3d30e15a55a34b45d3ebbf98e90 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From d73facf6d6b137986b32524a9c537257158fa327 Mon Sep 17 00:00:00 2001 +From edcb86594d3b1b4cf8a63144026aa5a3c86e7151 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 060/119] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 060/147] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -124615,10 +124587,10 @@ index ae83af649a607f67239f1a64bf45dd4b5770cc7d..4a7af9d0b910f59d17421ce14138400d ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From a92b385cc450a5be2f972c887800486a66de284a Mon Sep 17 00:00:00 2001 +From 4053f80d2c46fa0790a6c2e238970b6fd7498659 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 061/119] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 061/147] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -124913,10 +124885,10 @@ index 0000000000000000000000000000000000000000..b27dbee8f56773dbd2a5503dc864747d +MODULE_DESCRIPTION("Touchscreen driver for memory based FT5406"); +MODULE_LICENSE("GPL"); -From 913c6388aff7ef8c8627afc87e98e48ef62354fd Mon Sep 17 00:00:00 2001 +From 8030019a87b5c49814a70fde1d43c627e4856257 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Oct 2014 11:47:53 +0100 -Subject: [PATCH 062/119] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 062/147] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -126472,10 +126444,10 @@ index 6bd1089b07e0960830ed6bd6a8345202b7efd8b0..cd17dd11ebe7bbe00089e70cd2ccea74 static unsigned long noinline __clear_user_memset(void __user *addr, unsigned long n) -From 62b45f2357d402f01c1fa29999c4c89205e4aa23 Mon Sep 17 00:00:00 2001 +From eea678be3935ae755bf57db99215e8b4c9a540be Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 063/119] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 063/147] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -126510,10 +126482,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From 72b1e5e08bb0ac0726001beab05f2ff6ea496a05 Mon Sep 17 00:00:00 2001 +From 485faf73668700d52500ac01a4d30d6908f22795 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 064/119] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 064/147] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -127379,10 +127351,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From 2c71a1fe648524a406517c1983592bbfccb9345d Mon Sep 17 00:00:00 2001 +From 663e04b7e70254f8ddb5e304e3c95562fb37f7cb Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 065/119] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 065/147] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -127553,10 +127525,10 @@ index 0000000000000000000000000000000000000000..29ecc08a227cdd4b3c6141935d0c5d21 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From a9b4367962afa0dc8a09d11758e2c2de413f9e15 Mon Sep 17 00:00:00 2001 +From 984921f4b37192cfe97eba4ca299ad8aac437093 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 066/119] ASoC: Add support for Rpi-DAC +Subject: [PATCH 066/147] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -127840,10 +127812,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From e9fb8467d1f8c182a3c2fcc2092f7166a6626ede Mon Sep 17 00:00:00 2001 +From d86f8bf7c0a0e681fdc6c6cd329b8d4fa39c22f6 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 067/119] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 067/147] ASoC: wm8804: Implement MCLK configuration options, add 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs for most sample rates. At 192kHz only 128xfs is supported. The existing driver selects 128xfs automatically for some lower samples rates. By using an @@ -127892,10 +127864,10 @@ index 8d914702cae4a3fe2c0ca0599cd1ec79f7322c83..c846716b4ed1027ade5512e8be90801d .dapm_widgets = wm8804_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm8804_dapm_widgets), -From 79656ad7e01c9ed51f8b66ce45ec370e73c18a65 Mon Sep 17 00:00:00 2001 +From e9aae845fc9a8eb1acf1d39e174b796d5d8c33a7 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 068/119] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 068/147] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -128183,10 +128155,10 @@ index 0000000000000000000000000000000000000000..9840e15d3e2be6396bc3ce6e74749408 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 22f66d64612f480e18c40432580c26c9b87b4e07 Mon Sep 17 00:00:00 2001 +From 0fdc56dfbbbc1de8767c78b14c903c10ba72f6a7 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 069/119] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 069/147] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -128516,10 +128488,10 @@ index 0000000000000000000000000000000000000000..4e8e6dec14bcf4a1ff286c43742d4097 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From 5fe905d5530a80cd548236e0d4d205f064756233 Mon Sep 17 00:00:00 2001 +From 037745aa761b5ecc5abfe2229ed55e2a4be7355f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jul 2016 17:06:50 +0100 -Subject: [PATCH 070/119] iqaudio-dac: Compile fix - untested +Subject: [PATCH 070/147] iqaudio-dac: Compile fix - untested --- sound/soc/bcm/iqaudio-dac.c | 6 +++++- @@ -128543,10 +128515,10 @@ index 4e8e6dec14bcf4a1ff286c43742d4097249d6777..aa15bc4b49ca95edec905fddd8fd0a6d if (dapm->dev != codec_dai->dev) return 0; -From 951c89af714e4ab5c5d7b77d2de7f62599480274 Mon Sep 17 00:00:00 2001 +From cd727bd96a96c8c5dbce6ba443cbf67b5e8594d2 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 071/119] Added support for HiFiBerry DAC+ +Subject: [PATCH 071/147] Added support for HiFiBerry DAC+ The driver is based on the HiFiBerry DAC driver. However HiFiBerry DAC+ uses a different codec chip (PCM5122), therefore a new driver is necessary. @@ -129175,10 +129147,10 @@ index 047c48953a20cd4075000ac294a17fe59baedcde..090fe0ee08e8765f9edbb62777413bb6 dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From d0e800534e3c1cbfd6fd130cfa344643b2d33d41 Mon Sep 17 00:00:00 2001 +From 72abd2161e8f0970a08ef92e90e8cbe15453730a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 072/119] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 072/147] Added driver for HiFiBerry Amp amplifier add-on board The driver contains a low-level hardware driver for the TAS5713 and the drivers for the Raspberry Pi I2S subsystem. @@ -130010,10 +129982,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 8dd563be7049a34ac038e20b9fe16878d8b0d045 Mon Sep 17 00:00:00 2001 +From 872f6e9351e5148b57876f450f802035129fa0a8 Mon Sep 17 00:00:00 2001 From: "Daniel Matuschek (HiFiBerry)" Date: Tue, 26 Jul 2016 19:16:25 +0200 -Subject: [PATCH 073/119] Added HiFiBerry Digi+ Pro driver +Subject: [PATCH 073/147] Added HiFiBerry Digi+ Pro driver Signed-off-by: Daniel Matuschek --- @@ -130025,7 +129997,7 @@ Signed-off-by: Daniel Matuschek create mode 100644 arch/arm/boot/dts/overlays/hifiberry-digi-pro-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 7e740c894436e8fd9ed9b451e5b1f7888806922f..d4f31b76931d693a09ced67ef8da900a884892ae 100644 +index e6e2bfb85fbc257ea851c9f2afa5f78a87cdc41d..68832129f46b9c8320d0d2634c780bdb330314c9 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -31,6 +31,7 @@ dtbo-$(RPI_DT_OVERLAYS) += hifiberry-amp.dtbo @@ -130037,7 +130009,7 @@ index 7e740c894436e8fd9ed9b451e5b1f7888806922f..d4f31b76931d693a09ced67ef8da900a dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 780bf6dda5a6694cb312140329120fda3b0c2f61..57100ecd45721761546c443a3d6196d6e18879c6 100644 +index 3cc6560de2000480294688ec80bc8b26caf255d8..b32bca8ada3b10aa40a5c718a1823e1fa4f7f5b2 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -377,11 +377,17 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec @@ -130207,10 +130179,10 @@ index 9840e15d3e2be6396bc3ce6e74749408cc28c333..52ab9dea2e724c4238986ca53c59c849 ret = snd_soc_register_card(&snd_rpi_hifiberry_digi); -From 72820fee2ecf89e2f7a4ef82027c90b8f6b70037 Mon Sep 17 00:00:00 2001 +From 1524026ceed15fb3c928275c998d5db5b2658ee8 Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 074/119] Update ds1307 driver for device-tree support +Subject: [PATCH 074/147] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -130237,10 +130209,10 @@ index 821d9c089cdb48a40a244d1c18ab912d6f0b9432..409ed8e449e54ea6751185b1c0760cfc .driver = { .name = "rtc-ds1307", -From 023ea30560a19eed47c4f805f9b9ea06b7ec3ff6 Mon Sep 17 00:00:00 2001 +From 6eb5e4d561b2a5df47a08609cbe940be0e1a2b40 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 075/119] Add driver for rpi-proto +Subject: [PATCH 075/147] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -130456,10 +130428,10 @@ index 0000000000000000000000000000000000000000..9db678e885efd63d84d60a098a84ed67 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From e2e8c864749a79c7642a30a9a79a539ad698c872 Mon Sep 17 00:00:00 2001 +From 39035d86d5d50002e7efb7a3fe277897b2f8b0ef Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 076/119] RaspiDAC3 support +Subject: [PATCH 076/147] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -130708,10 +130680,10 @@ index 0000000000000000000000000000000000000000..e7422e2dd3d70622a48ab3b2e1929869 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 811042dba5cb49d063d49654c80b039bae7dd7a6 Mon Sep 17 00:00:00 2001 +From 6ad06c414a9e23331fca61bd0c8b1b21808b3393 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:02:34 +0100 -Subject: [PATCH 077/119] tpa6130a2: Add headphone switch control +Subject: [PATCH 077/147] tpa6130a2: Add headphone switch control Signed-off-by: Jan Grulich --- @@ -130802,10 +130774,10 @@ index 11d85c5c787addb8d8add7fc2b52ab91cc49b63d..3caaa17e28e91e995d6781ca7f88b747 /* -From c16136f1fe865aefadbbe1d2900a8484ca2fb7fb Mon Sep 17 00:00:00 2001 +From 4483456f487baf145a7bed1735c17975d383a064 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 078/119] Add Support for JustBoom Audio boards +Subject: [PATCH 078/147] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -131259,10 +131231,10 @@ index 0000000000000000000000000000000000000000..91acb666380faa3c0deb2230f8a0f8bb +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From 6c495e02ccebc9dd1d11f563f58a7d6dab5a693a Mon Sep 17 00:00:00 2001 +From 357a22cd1437212f0a6471b8e80204b507086397 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 079/119] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 079/147] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -131444,10 +131416,10 @@ index 0000000000000000000000000000000000000000..6e2ee027926ee63c89222f75ceb89e3d +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 3d1b3ba90195ec409f82395661600ed1548e626d Mon Sep 17 00:00:00 2001 +From 22af68fbd5420737fa0b249ad43a00736ce952dc Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 080/119] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 080/147] New AudioInjector.net Pi soundcard with low jitter audio in and out. Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. @@ -131696,10 +131668,10 @@ index 0000000000000000000000000000000000000000..5ff0985e07efb96b95634a65995f09f7 +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From 1c2df2752dbf675b9335c96e91c89ab2adcac05f Mon Sep 17 00:00:00 2001 +From 29bd38b33ebe65cf466ef59f36bfa86e691d33f6 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 081/119] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 081/147] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -131999,10 +131971,10 @@ index 0000000000000000000000000000000000000000..9b6e829bcb5b1762a853775e78163196 +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From be6f601fc0467382088088a3a8856ab290921f42 Mon Sep 17 00:00:00 2001 +From 6e1df8912f78a2ed6d0e9dd6229c2130036d64f5 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 082/119] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 082/147] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -132475,10 +132447,10 @@ index 0000000000000000000000000000000000000000..446796e7e4c14a7d95b2f2a01211d9a0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From 321645738cac0f80ae22b26529d5886431e04dac Mon Sep 17 00:00:00 2001 +From 051c227e899d74944f8921d8d25ca08634ceb1e9 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 083/119] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 083/147] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -132651,10 +132623,10 @@ index 0000000000000000000000000000000000000000..89e65317512bc774453ac8d0d5b0ff98 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From 2b9ffb0beec1a4b18eda671163e68887cee537d7 Mon Sep 17 00:00:00 2001 +From b8fa35d7047b78d20dcc0d11ce6097a93f751676 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Fri, 17 Jun 2016 14:48:16 +1000 -Subject: [PATCH 084/119] ASoc: wm8731: add 32bit mode. +Subject: [PATCH 084/147] ASoc: wm8731: add 32bit mode. commit cf5ef3a299ba32f6ac24c3c6ba18c1b7f1b5475f upstream. @@ -132693,963 +132665,10 @@ index 4bcf5f8ece50f3681948a9fbc47b85400d9a8b51..d18261a442560cd2c108c34295bd5b17 static const struct snd_soc_dai_ops wm8731_dai_ops = { .startup = wm8731_startup, -From b60575dbbfb801c4c10f60fbbc969fa0b1ae54c2 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 1 Jun 2016 15:40:58 +0100 -Subject: [PATCH 085/119] Revert "ASoC: bcm2835: Add S16_LE support via packed - DMA transfers" - -This reverts commit beff053c0ef6983897e3481169292e6435ef0a2d. ---- - sound/soc/bcm/bcm2835-i2s.c | 9 --------- - 1 file changed, 9 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 6ba20498202ed36906b52096893a88867a79269f..a0026e2d2f0afd700751b1b4fa2523585829173e 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -690,15 +690,6 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].maxburst = 2; - dev->dma_data[SNDRV_PCM_STREAM_CAPTURE].maxburst = 2; - -- /* -- * Set the PACK flag to enable S16_LE support (2 S16_LE values -- * packed into 32-bit transfers). -- */ -- dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].flags = -- SND_DMAENGINE_PCM_DAI_FLAG_PACK; -- dev->dma_data[SNDRV_PCM_STREAM_CAPTURE].flags = -- SND_DMAENGINE_PCM_DAI_FLAG_PACK; -- - /* BCLK ratio - use default */ - dev->bclk_ratio = 0; - - -From 71c559c6050f641d310d771da0e0c5955bd2ddc4 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 1 Jun 2016 15:41:01 +0100 -Subject: [PATCH 086/119] Revert "ASoC: bcm2835: setup clock only if CPU is - clock master" - -This reverts commit 60507fe191f524e82986fa737e5b27b4d3ad9289. ---- - sound/soc/bcm/bcm2835-i2s.c | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index a0026e2d2f0afd700751b1b4fa2523585829173e..d2663e79ece1a2b649377e4a89460aa5a6d150b5 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -276,15 +276,8 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - /* otherwise calculate a fitting block ratio */ - bclk_ratio = 2 * data_length; - -- /* Clock should only be set up here if CPU is clock master */ -- switch (dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) { -- case SND_SOC_DAIFMT_CBS_CFS: -- case SND_SOC_DAIFMT_CBS_CFM: -- clk_set_rate(dev->clk, sampling_rate * bclk_ratio); -- break; -- default: -- break; -- } -+ /* set target clock rate*/ -+ clk_set_rate(dev->clk, sampling_rate * bclk_ratio); - - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; - -From 2cdbbbacfd4f75bcd57e6b7884e9727d7a1d8e2c Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 1 Jun 2016 15:41:03 +0100 -Subject: [PATCH 087/119] Revert "ASoC: bcm2835: add 24bit support" - -This reverts commit a34b027dca5ea840fbc84121db66488375acfdea. ---- - sound/soc/bcm/bcm2835-i2s.c | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index d2663e79ece1a2b649377e4a89460aa5a6d150b5..1c1f2210387b26e9551959378f6792f18648652e 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -259,9 +259,6 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - case SNDRV_PCM_FORMAT_S16_LE: - data_length = 16; - break; -- case SNDRV_PCM_FORMAT_S24_LE: -- data_length = 24; -- break; - case SNDRV_PCM_FORMAT_S32_LE: - data_length = 32; - break; -@@ -282,7 +279,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; - -- if (data_length >= 24) -+ if (data_length > 24) - format |= BCM2835_I2S_CHWEX; - - format |= BCM2835_I2S_CHWID((data_length-8)&0xf); -@@ -573,7 +570,6 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE -- | SNDRV_PCM_FMTBIT_S24_LE - | SNDRV_PCM_FMTBIT_S32_LE - }, - .capture = { -@@ -581,7 +577,6 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE -- | SNDRV_PCM_FMTBIT_S24_LE - | SNDRV_PCM_FMTBIT_S32_LE - }, - .ops = &bcm2835_i2s_dai_ops, - -From 38170c7455fe28858e500124bc82e9647291c907 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 1 Jun 2016 15:41:09 +0100 -Subject: [PATCH 088/119] Revert "ASoC: bcm2835: move to use the clock - framework" - -This reverts commit 517e7a1537ae4663268be5d0c0ec62c563b9fc99. ---- - sound/soc/bcm/bcm2835-i2s.c | 284 ++++++++++++++++++++++++++++++++++---------- - 1 file changed, 220 insertions(+), 64 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 1c1f2210387b26e9551959378f6792f18648652e..3303d5f58082f68b68b535b2bdf7ce8d14cafcc4 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -37,7 +37,6 @@ - #include - #include - #include --#include - #include - - #include -@@ -47,6 +46,55 @@ - #include - #include - -+/* Clock registers */ -+#define BCM2835_CLK_PCMCTL_REG 0x00 -+#define BCM2835_CLK_PCMDIV_REG 0x04 -+ -+/* Clock register settings */ -+#define BCM2835_CLK_PASSWD (0x5a000000) -+#define BCM2835_CLK_PASSWD_MASK (0xff000000) -+#define BCM2835_CLK_MASH(v) ((v) << 9) -+#define BCM2835_CLK_FLIP BIT(8) -+#define BCM2835_CLK_BUSY BIT(7) -+#define BCM2835_CLK_KILL BIT(5) -+#define BCM2835_CLK_ENAB BIT(4) -+#define BCM2835_CLK_SRC(v) (v) -+ -+#define BCM2835_CLK_SHIFT (12) -+#define BCM2835_CLK_DIVI(v) ((v) << BCM2835_CLK_SHIFT) -+#define BCM2835_CLK_DIVF(v) (v) -+#define BCM2835_CLK_DIVF_MASK (0xFFF) -+ -+enum { -+ BCM2835_CLK_MASH_0 = 0, -+ BCM2835_CLK_MASH_1, -+ BCM2835_CLK_MASH_2, -+ BCM2835_CLK_MASH_3, -+}; -+ -+enum { -+ BCM2835_CLK_SRC_GND = 0, -+ BCM2835_CLK_SRC_OSC, -+ BCM2835_CLK_SRC_DBG0, -+ BCM2835_CLK_SRC_DBG1, -+ BCM2835_CLK_SRC_PLLA, -+ BCM2835_CLK_SRC_PLLC, -+ BCM2835_CLK_SRC_PLLD, -+ BCM2835_CLK_SRC_HDMI, -+}; -+ -+/* Most clocks are not useable (freq = 0) */ -+static const unsigned int bcm2835_clk_freq[BCM2835_CLK_SRC_HDMI+1] = { -+ [BCM2835_CLK_SRC_GND] = 0, -+ [BCM2835_CLK_SRC_OSC] = 19200000, -+ [BCM2835_CLK_SRC_DBG0] = 0, -+ [BCM2835_CLK_SRC_DBG1] = 0, -+ [BCM2835_CLK_SRC_PLLA] = 0, -+ [BCM2835_CLK_SRC_PLLC] = 0, -+ [BCM2835_CLK_SRC_PLLD] = 500000000, -+ [BCM2835_CLK_SRC_HDMI] = 0, -+}; -+ - /* I2S registers */ - #define BCM2835_I2S_CS_A_REG 0x00 - #define BCM2835_I2S_FIFO_A_REG 0x04 -@@ -110,6 +158,10 @@ - #define BCM2835_I2S_INT_RXR BIT(1) - #define BCM2835_I2S_INT_TXW BIT(0) - -+/* I2S DMA interface */ -+/* FIXME: Needs IOMMU support */ -+#define BCM2835_VCMMU_SHIFT (0x7E000000 - 0x20000000) -+ - /* General device struct */ - struct bcm2835_i2s_dev { - struct device *dev; -@@ -117,23 +169,21 @@ struct bcm2835_i2s_dev { - unsigned int fmt; - unsigned int bclk_ratio; - -- struct regmap *i2s_regmap; -- struct clk *clk; -- bool clk_prepared; -+ struct regmap *i2s_regmap; -+ struct regmap *clk_regmap; - }; - - static void bcm2835_i2s_start_clock(struct bcm2835_i2s_dev *dev) - { -+ /* Start the clock if in master mode */ - unsigned int master = dev->fmt & SND_SOC_DAIFMT_MASTER_MASK; - -- if (dev->clk_prepared) -- return; -- - switch (master) { - case SND_SOC_DAIFMT_CBS_CFS: - case SND_SOC_DAIFMT_CBS_CFM: -- clk_prepare_enable(dev->clk); -- dev->clk_prepared = true; -+ regmap_update_bits(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_PASSWD_MASK | BCM2835_CLK_ENAB, -+ BCM2835_CLK_PASSWD | BCM2835_CLK_ENAB); - break; - default: - break; -@@ -142,9 +192,28 @@ static void bcm2835_i2s_start_clock(struct bcm2835_i2s_dev *dev) - - static void bcm2835_i2s_stop_clock(struct bcm2835_i2s_dev *dev) - { -- if (dev->clk_prepared) -- clk_disable_unprepare(dev->clk); -- dev->clk_prepared = false; -+ uint32_t clkreg; -+ int timeout = 1000; -+ -+ /* Stop clock */ -+ regmap_update_bits(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_PASSWD_MASK | BCM2835_CLK_ENAB, -+ BCM2835_CLK_PASSWD); -+ -+ /* Wait for the BUSY flag going down */ -+ while (--timeout) { -+ regmap_read(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, &clkreg); -+ if (!(clkreg & BCM2835_CLK_BUSY)) -+ break; -+ } -+ -+ if (!timeout) { -+ /* KILL the clock */ -+ dev_err(dev->dev, "I2S clock didn't stop. Kill the clock!\n"); -+ regmap_update_bits(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_KILL | BCM2835_CLK_PASSWD_MASK, -+ BCM2835_CLK_KILL | BCM2835_CLK_PASSWD); -+ } - } - - static void bcm2835_i2s_clear_fifos(struct bcm2835_i2s_dev *dev, -@@ -154,7 +223,8 @@ static void bcm2835_i2s_clear_fifos(struct bcm2835_i2s_dev *dev, - uint32_t syncval; - uint32_t csreg; - uint32_t i2s_active_state; -- bool clk_was_prepared; -+ uint32_t clkreg; -+ uint32_t clk_active_state; - uint32_t off; - uint32_t clr; - -@@ -168,10 +238,15 @@ static void bcm2835_i2s_clear_fifos(struct bcm2835_i2s_dev *dev, - regmap_read(dev->i2s_regmap, BCM2835_I2S_CS_A_REG, &csreg); - i2s_active_state = csreg & (BCM2835_I2S_RXON | BCM2835_I2S_TXON); - -+ regmap_read(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, &clkreg); -+ clk_active_state = clkreg & BCM2835_CLK_ENAB; -+ - /* Start clock if not running */ -- clk_was_prepared = dev->clk_prepared; -- if (!clk_was_prepared) -- bcm2835_i2s_start_clock(dev); -+ if (!clk_active_state) { -+ regmap_update_bits(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_PASSWD_MASK | BCM2835_CLK_ENAB, -+ BCM2835_CLK_PASSWD | BCM2835_CLK_ENAB); -+ } - - /* Stop I2S module */ - regmap_update_bits(dev->i2s_regmap, BCM2835_I2S_CS_A_REG, off, 0); -@@ -205,7 +280,7 @@ static void bcm2835_i2s_clear_fifos(struct bcm2835_i2s_dev *dev, - dev_err(dev->dev, "I2S SYNC error!\n"); - - /* Stop clock if it was not running before */ -- if (!clk_was_prepared) -+ if (!clk_active_state) - bcm2835_i2s_stop_clock(dev); - - /* Restore I2S state */ -@@ -234,9 +309,19 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai) - { - struct bcm2835_i2s_dev *dev = snd_soc_dai_get_drvdata(dai); -+ - unsigned int sampling_rate = params_rate(params); - unsigned int data_length, data_delay, bclk_ratio; - unsigned int ch1pos, ch2pos, mode, format; -+ unsigned int mash = BCM2835_CLK_MASH_1; -+ unsigned int divi, divf, target_frequency; -+ int clk_src = -1; -+ unsigned int master = dev->fmt & SND_SOC_DAIFMT_MASTER_MASK; -+ bool bit_master = (master == SND_SOC_DAIFMT_CBS_CFS -+ || master == SND_SOC_DAIFMT_CBS_CFM); -+ -+ bool frame_master = (master == SND_SOC_DAIFMT_CBS_CFS -+ || master == SND_SOC_DAIFMT_CBM_CFS); - uint32_t csreg; - - /* -@@ -258,9 +343,11 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - switch (params_format(params)) { - case SNDRV_PCM_FORMAT_S16_LE: - data_length = 16; -+ bclk_ratio = 40; - break; - case SNDRV_PCM_FORMAT_S32_LE: - data_length = 32; -+ bclk_ratio = 80; - break; - default: - return -EINVAL; -@@ -269,12 +356,69 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - /* If bclk_ratio already set, use that one. */ - if (dev->bclk_ratio) - bclk_ratio = dev->bclk_ratio; -- else -- /* otherwise calculate a fitting block ratio */ -- bclk_ratio = 2 * data_length; - -- /* set target clock rate*/ -- clk_set_rate(dev->clk, sampling_rate * bclk_ratio); -+ /* -+ * Clock Settings -+ * -+ * The target frequency of the bit clock is -+ * sampling rate * frame length -+ * -+ * Integer mode: -+ * Sampling rates that are multiples of 8000 kHz -+ * can be driven by the oscillator of 19.2 MHz -+ * with an integer divider as long as the frame length -+ * is an integer divider of 19200000/8000=2400 as set up above. -+ * This is no longer possible if the sampling rate -+ * is too high (e.g. 192 kHz), because the oscillator is too slow. -+ * -+ * MASH mode: -+ * For all other sampling rates, it is not possible to -+ * have an integer divider. Approximate the clock -+ * with the MASH module that induces a slight frequency -+ * variance. To minimize that it is best to have the fastest -+ * clock here. That is PLLD with 500 MHz. -+ */ -+ target_frequency = sampling_rate * bclk_ratio; -+ clk_src = BCM2835_CLK_SRC_OSC; -+ mash = BCM2835_CLK_MASH_0; -+ -+ if (bcm2835_clk_freq[clk_src] % target_frequency == 0 -+ && bit_master && frame_master) { -+ divi = bcm2835_clk_freq[clk_src] / target_frequency; -+ divf = 0; -+ } else { -+ uint64_t dividend; -+ -+ if (!dev->bclk_ratio) { -+ /* -+ * Overwrite bclk_ratio, because the -+ * above trick is not needed or can -+ * not be used. -+ */ -+ bclk_ratio = 2 * data_length; -+ } -+ -+ target_frequency = sampling_rate * bclk_ratio; -+ -+ clk_src = BCM2835_CLK_SRC_PLLD; -+ mash = BCM2835_CLK_MASH_1; -+ -+ dividend = bcm2835_clk_freq[clk_src]; -+ dividend <<= BCM2835_CLK_SHIFT; -+ do_div(dividend, target_frequency); -+ divi = dividend >> BCM2835_CLK_SHIFT; -+ divf = dividend & BCM2835_CLK_DIVF_MASK; -+ } -+ -+ /* Set clock divider */ -+ regmap_write(dev->clk_regmap, BCM2835_CLK_PCMDIV_REG, BCM2835_CLK_PASSWD -+ | BCM2835_CLK_DIVI(divi) -+ | BCM2835_CLK_DIVF(divf)); -+ -+ /* Setup clock, but don't start it yet */ -+ regmap_write(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, BCM2835_CLK_PASSWD -+ | BCM2835_CLK_MASH(mash) -+ | BCM2835_CLK_SRC(clk_src)); - - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; -@@ -548,7 +692,7 @@ static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = { - .trigger = bcm2835_i2s_trigger, - .hw_params = bcm2835_i2s_hw_params, - .set_fmt = bcm2835_i2s_set_dai_fmt, -- .set_bclk_ratio = bcm2835_i2s_set_dai_bclk_ratio, -+ .set_bclk_ratio = bcm2835_i2s_set_dai_bclk_ratio - }; - - static int bcm2835_i2s_dai_probe(struct snd_soc_dai *dai) -@@ -606,14 +750,34 @@ static bool bcm2835_i2s_precious_reg(struct device *dev, unsigned int reg) - }; - } - --static const struct regmap_config bcm2835_regmap_config = { -- .reg_bits = 32, -- .reg_stride = 4, -- .val_bits = 32, -- .max_register = BCM2835_I2S_GRAY_REG, -- .precious_reg = bcm2835_i2s_precious_reg, -- .volatile_reg = bcm2835_i2s_volatile_reg, -- .cache_type = REGCACHE_RBTREE, -+static bool bcm2835_clk_volatile_reg(struct device *dev, unsigned int reg) -+{ -+ switch (reg) { -+ case BCM2835_CLK_PCMCTL_REG: -+ return true; -+ default: -+ return false; -+ }; -+} -+ -+static const struct regmap_config bcm2835_regmap_config[] = { -+ { -+ .reg_bits = 32, -+ .reg_stride = 4, -+ .val_bits = 32, -+ .max_register = BCM2835_I2S_GRAY_REG, -+ .precious_reg = bcm2835_i2s_precious_reg, -+ .volatile_reg = bcm2835_i2s_volatile_reg, -+ .cache_type = REGCACHE_RBTREE, -+ }, -+ { -+ .reg_bits = 32, -+ .reg_stride = 4, -+ .val_bits = 32, -+ .max_register = BCM2835_CLK_PCMDIV_REG, -+ .volatile_reg = bcm2835_clk_volatile_reg, -+ .cache_type = REGCACHE_RBTREE, -+ }, - }; - - static const struct snd_soc_component_driver bcm2835_i2s_component = { -@@ -623,50 +787,42 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { - static int bcm2835_i2s_probe(struct platform_device *pdev) - { - struct bcm2835_i2s_dev *dev; -+ int i; - int ret; -- struct resource *mem; -- void __iomem *base; -- const __be32 *addr; -- dma_addr_t dma_base; -+ struct regmap *regmap[2]; -+ struct resource *mem[2]; -+ -+ /* Request both ioareas */ -+ for (i = 0; i <= 1; i++) { -+ void __iomem *base; -+ -+ mem[i] = platform_get_resource(pdev, IORESOURCE_MEM, i); -+ base = devm_ioremap_resource(&pdev->dev, mem[i]); -+ if (IS_ERR(base)) -+ return PTR_ERR(base); -+ -+ regmap[i] = devm_regmap_init_mmio(&pdev->dev, base, -+ &bcm2835_regmap_config[i]); -+ if (IS_ERR(regmap[i])) -+ return PTR_ERR(regmap[i]); -+ } - - dev = devm_kzalloc(&pdev->dev, sizeof(*dev), - GFP_KERNEL); - if (!dev) - return -ENOMEM; - -- /* get the clock */ -- dev->clk_prepared = false; -- dev->clk = devm_clk_get(&pdev->dev, NULL); -- if (IS_ERR(dev->clk)) { -- dev_err(&pdev->dev, "could not get clk: %ld\n", -- PTR_ERR(dev->clk)); -- return PTR_ERR(dev->clk); -- } -- -- /* Request ioarea */ -- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- base = devm_ioremap_resource(&pdev->dev, mem); -- if (IS_ERR(base)) -- return PTR_ERR(base); -- -- dev->i2s_regmap = devm_regmap_init_mmio(&pdev->dev, base, -- &bcm2835_regmap_config); -- if (IS_ERR(dev->i2s_regmap)) -- return PTR_ERR(dev->i2s_regmap); -- -- /* Set the DMA address - we have to parse DT ourselves */ -- addr = of_get_address(pdev->dev.of_node, 0, NULL, NULL); -- if (!addr) { -- dev_err(&pdev->dev, "could not get DMA-register address\n"); -- return -EINVAL; -- } -- dma_base = be32_to_cpup(addr); -+ dev->i2s_regmap = regmap[0]; -+ dev->clk_regmap = regmap[1]; - -+ /* Set the DMA address */ - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr = -- dma_base + BCM2835_I2S_FIFO_A_REG; -+ (dma_addr_t)mem[0]->start + BCM2835_I2S_FIFO_A_REG -+ + BCM2835_VCMMU_SHIFT; - - dev->dma_data[SNDRV_PCM_STREAM_CAPTURE].addr = -- dma_base + BCM2835_I2S_FIFO_A_REG; -+ (dma_addr_t)mem[0]->start + BCM2835_I2S_FIFO_A_REG -+ + BCM2835_VCMMU_SHIFT; - - /* Set the bus width */ - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr_width = - -From 9c1654cd3d53621b50ff62b0fe21e42f111246d2 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 16:44:05 +0200 -Subject: [PATCH 089/119] bcm2835-i2s: get base address for DMA from devicetree - -Code copied from spi-bcm2835. Get physical address from devicetree -instead of using hardcoded constant. - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 20 ++++++++++++-------- - 1 file changed, 12 insertions(+), 8 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 3303d5f58082f68b68b535b2bdf7ce8d14cafcc4..0f25db4cd198c0a511e8a205b0cb2be62ba94adf 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -158,10 +159,6 @@ static const unsigned int bcm2835_clk_freq[BCM2835_CLK_SRC_HDMI+1] = { - #define BCM2835_I2S_INT_RXR BIT(1) - #define BCM2835_I2S_INT_TXW BIT(0) - --/* I2S DMA interface */ --/* FIXME: Needs IOMMU support */ --#define BCM2835_VCMMU_SHIFT (0x7E000000 - 0x20000000) -- - /* General device struct */ - struct bcm2835_i2s_dev { - struct device *dev; -@@ -791,6 +788,15 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - int ret; - struct regmap *regmap[2]; - struct resource *mem[2]; -+ const __be32 *addr; -+ dma_addr_t dma_reg_base; -+ -+ addr = of_get_address(pdev->dev.of_node, 0, NULL, NULL); -+ if (!addr) { -+ dev_err(&pdev->dev, "could not get DMA-register address\n"); -+ return -ENODEV; -+ } -+ dma_reg_base = be32_to_cpup(addr); - - /* Request both ioareas */ - for (i = 0; i <= 1; i++) { -@@ -817,12 +823,10 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - - /* Set the DMA address */ - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr = -- (dma_addr_t)mem[0]->start + BCM2835_I2S_FIFO_A_REG -- + BCM2835_VCMMU_SHIFT; -+ dma_reg_base + BCM2835_I2S_FIFO_A_REG; - - dev->dma_data[SNDRV_PCM_STREAM_CAPTURE].addr = -- (dma_addr_t)mem[0]->start + BCM2835_I2S_FIFO_A_REG -- + BCM2835_VCMMU_SHIFT; -+ dma_reg_base + BCM2835_I2S_FIFO_A_REG; - - /* Set the bus width */ - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr_width = - -From def571fa6c3dc0c46f0bc630696abcb8d928997e Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:21:16 +0200 -Subject: [PATCH 090/119] bcm2835-i2s: add 24bit support, update bclk_ratio to - more correct values - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit 62c05a0b5328d9376d39c9e74da10b8a2465c234 ("ASoC: BCM2708: -Add 24 bit support") - -This adds 24 bit support to the I2S driver of the BCM2708. -Besides enabling the 24 bit flags, it includes two bug fixes: - -MMAP is not supported. Claiming this leads to strange issues -when the format of driver and file do not match. - -The datasheet states that the width extension bit should be set -for widths greater than 24, but greater or equal would be correct. -This follows from the definition of the width field. - -Signed-off-by: Florian Meier - -RPi commit 3e8c672bc4e92d457aa4654bbb4cfd79a18a2327 ("bcm2708-i2s: -Update bclk_ratio to more correct values") - -Discussion about blck_ratio affecting sound quality: -https://github.com/raspberrypi/linux/issues/681 - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 0f25db4cd198c0a511e8a205b0cb2be62ba94adf..0f35d7c0f4026bb50a7223461b907b9797bd9a05 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -340,11 +340,15 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - switch (params_format(params)) { - case SNDRV_PCM_FORMAT_S16_LE: - data_length = 16; -- bclk_ratio = 40; -+ bclk_ratio = 50; -+ break; -+ case SNDRV_PCM_FORMAT_S24_LE: -+ data_length = 24; -+ bclk_ratio = 50; - break; - case SNDRV_PCM_FORMAT_S32_LE: - data_length = 32; -- bclk_ratio = 80; -+ bclk_ratio = 100; - break; - default: - return -EINVAL; -@@ -420,7 +424,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; - -- if (data_length > 24) -+ if (data_length >= 24) - format |= BCM2835_I2S_CHWEX; - - format |= BCM2835_I2S_CHWID((data_length-8)&0xf); -@@ -711,6 +715,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE -+ | SNDRV_PCM_FMTBIT_S24_LE - | SNDRV_PCM_FMTBIT_S32_LE - }, - .capture = { -@@ -718,6 +723,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE -+ | SNDRV_PCM_FMTBIT_S24_LE - | SNDRV_PCM_FMTBIT_S32_LE - }, - .ops = &bcm2835_i2s_dai_ops, - -From c80c24f5107b6d4489edc67e7908612ecb713038 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:25:51 +0200 -Subject: [PATCH 091/119] bcm2835-i2s: setup clock only if CPU is clock master - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit c14827ecdaa36607f6110f9ce8df96e698672191 ("bcm2708: Allow -option card devices to be configured via DT") - -Original work by Zoltan Szenczi, committed to RPi tree by -Phil Elwell. - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 28 +++++++++++++++++++--------- - 1 file changed, 19 insertions(+), 9 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 0f35d7c0f4026bb50a7223461b907b9797bd9a05..d5e412302811ed8b007fc53f0aa2b5ddd12774b6 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -411,15 +411,25 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - divf = dividend & BCM2835_CLK_DIVF_MASK; - } - -- /* Set clock divider */ -- regmap_write(dev->clk_regmap, BCM2835_CLK_PCMDIV_REG, BCM2835_CLK_PASSWD -- | BCM2835_CLK_DIVI(divi) -- | BCM2835_CLK_DIVF(divf)); -- -- /* Setup clock, but don't start it yet */ -- regmap_write(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, BCM2835_CLK_PASSWD -- | BCM2835_CLK_MASH(mash) -- | BCM2835_CLK_SRC(clk_src)); -+ /* Clock should only be set up here if CPU is clock master */ -+ switch (dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) { -+ case SND_SOC_DAIFMT_CBS_CFS: -+ case SND_SOC_DAIFMT_CBS_CFM: -+ /* Set clock divider */ -+ regmap_write(dev->clk_regmap, BCM2835_CLK_PCMDIV_REG, -+ BCM2835_CLK_PASSWD -+ | BCM2835_CLK_DIVI(divi) -+ | BCM2835_CLK_DIVF(divf)); -+ -+ /* Setup clock, but don't start it yet */ -+ regmap_write(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_PASSWD -+ | BCM2835_CLK_MASH(mash) -+ | BCM2835_CLK_SRC(clk_src)); -+ break; -+ default: -+ break; -+ } - - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; - -From 4274dd24fee0d47cf65592584beffd04370a2945 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:49:51 +0200 -Subject: [PATCH 092/119] bcm2835-i2s: Eliminate debugfs directory error - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit fd7d7a3dbe9262d16971ef81c234ed28c6499dd7 ("bcm2708: -Eliminate i2s debugfs directory error") - -Qualify the two regmap ranges uses by bcm2708-i2s ('-i2s' and '-clk') -to avoid the name clash when registering debugfs entries. - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index d5e412302811ed8b007fc53f0aa2b5ddd12774b6..2d29050e739b0af02d0f5122d18178b61c024bea 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -782,6 +782,7 @@ static const struct regmap_config bcm2835_regmap_config[] = { - .precious_reg = bcm2835_i2s_precious_reg, - .volatile_reg = bcm2835_i2s_volatile_reg, - .cache_type = REGCACHE_RBTREE, -+ .name = "i2s", - }, - { - .reg_bits = 32, -@@ -790,6 +791,7 @@ static const struct regmap_config bcm2835_regmap_config[] = { - .max_register = BCM2835_CLK_PCMDIV_REG, - .volatile_reg = bcm2835_clk_volatile_reg, - .cache_type = REGCACHE_RBTREE, -+ .name = "clk", - }, - }; - - -From 6ecdfdf4adacd4fe80fa448e9e2be6512b628428 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:35:20 +0200 -Subject: [PATCH 093/119] bcm2835-i2s: Register PCM device - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit ba46b4935a23aa2caac1855ead52a035d4776680 ("ASoC: Add -support for BCM2708") - -This driver adds support for digital audio (I2S) -for the BCM2708 SoC that is used by the -Raspberry Pi. External audio codecs can be -connected to the Raspberry Pi via P5 header. - -It relies on cyclic DMA engine support for BCM2708. - -Signed-off-by: Florian Meier - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 2d29050e739b0af02d0f5122d18178b61c024bea..ce93ef0579ab142c788736f0d309c92636b8983d 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -799,6 +799,25 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { - .name = "bcm2835-i2s-comp", - }; - -+static const struct snd_pcm_hardware bcm2835_pcm_hardware = { -+ .info = SNDRV_PCM_INFO_INTERLEAVED | -+ SNDRV_PCM_INFO_JOINT_DUPLEX, -+ .formats = SNDRV_PCM_FMTBIT_S16_LE | -+ SNDRV_PCM_FMTBIT_S24_LE | -+ SNDRV_PCM_FMTBIT_S32_LE, -+ .period_bytes_min = 32, -+ .period_bytes_max = 64 * PAGE_SIZE, -+ .periods_min = 2, -+ .periods_max = 255, -+ .buffer_bytes_max = 128 * PAGE_SIZE, -+}; -+ -+static const struct snd_dmaengine_pcm_config bcm2835_dmaengine_pcm_config = { -+ .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config, -+ .pcm_hardware = &bcm2835_pcm_hardware, -+ .prealloc_buffer_size = 256 * PAGE_SIZE, -+}; -+ - static int bcm2835_i2s_probe(struct platform_device *pdev) - { - struct bcm2835_i2s_dev *dev; -@@ -870,7 +889,9 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - return ret; - } - -- ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); -+ ret = devm_snd_dmaengine_pcm_register(&pdev->dev, -+ &bcm2835_dmaengine_pcm_config, -+ SND_DMAENGINE_PCM_FLAG_COMPAT); - if (ret) { - dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); - return ret; - -From d5213772ae47d7ca423e9a16aa34624f1ec77fda Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:55:21 +0200 -Subject: [PATCH 094/119] bcm2835-i2s: Enable MMAP support via a DT property - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit 7ee829fd77a30127db5d0b3c7d79b8718166e568 ("bcm2708-i2s: -Enable MMAP support via a DT property and overlay") - -The i2s driver used to claim to support MMAP, but that feature was disabled -when some problems were found. Add the ability to enable this feature -through Device Tree, using the i2s-mmap overlay. - -See: #1004 - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index ce93ef0579ab142c788736f0d309c92636b8983d..6f60c2cebb412524bb0e30d0339fe556680e8637 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -799,7 +799,7 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { - .name = "bcm2835-i2s-comp", - }; - --static const struct snd_pcm_hardware bcm2835_pcm_hardware = { -+static struct snd_pcm_hardware bcm2835_pcm_hardware = { - .info = SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_JOINT_DUPLEX, - .formats = SNDRV_PCM_FMTBIT_S16_LE | -@@ -835,6 +835,11 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - } - dma_reg_base = be32_to_cpup(addr); - -+ if (of_property_read_bool(pdev->dev.of_node, "brcm,enable-mmap")) -+ bcm2835_pcm_hardware.info |= -+ SNDRV_PCM_INFO_MMAP | -+ SNDRV_PCM_INFO_MMAP_VALID; -+ - /* Request both ioareas */ - for (i = 0; i <= 1; i++) { - void __iomem *base; - -From 71a9af52e8b8ebb7f3eb2bb48d715cc3da47d80e Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Thu, 21 Apr 2016 15:44:14 +0100 -Subject: [PATCH 095/119] bcm2835-i2s: Reduce the TX DREQ threshold - -TX FIFO overrun is thought to be the cause of channel swapping, so -reducing the DREQ threshold seems reasonable and appears to be -effective. - -See: https://github.com/raspberrypi/linux/issues/1417 - -Signed-off-by: Phil Elwell ---- - sound/soc/bcm/bcm2835-i2s.c | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 6f60c2cebb412524bb0e30d0339fe556680e8637..b26f9587dec01d62606df3f47b3ef00c908fa05b 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -555,15 +555,22 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - - /* Setup the DMA parameters */ - regmap_update_bits(dev->i2s_regmap, BCM2835_I2S_CS_A_REG, -- BCM2835_I2S_RXTHR(1) -- | BCM2835_I2S_TXTHR(1) -- | BCM2835_I2S_DMAEN, 0xffffffff); -+ BCM2835_I2S_RXTHR(3) -+ | BCM2835_I2S_TXTHR(3) -+ | BCM2835_I2S_DMAEN, -+ BCM2835_I2S_RXTHR(1) -+ | BCM2835_I2S_TXTHR(1) -+ | BCM2835_I2S_DMAEN); - - regmap_update_bits(dev->i2s_regmap, BCM2835_I2S_DREQ_A_REG, -- BCM2835_I2S_TX_PANIC(0x10) -- | BCM2835_I2S_RX_PANIC(0x30) -- | BCM2835_I2S_TX(0x30) -- | BCM2835_I2S_RX(0x20), 0xffffffff); -+ BCM2835_I2S_TX_PANIC(0x7f) -+ | BCM2835_I2S_RX_PANIC(0x7f) -+ | BCM2835_I2S_TX(0x7f) -+ | BCM2835_I2S_RX(0x7f), -+ BCM2835_I2S_TX_PANIC(0x10) -+ | BCM2835_I2S_RX_PANIC(0x30) -+ | BCM2835_I2S_TX(0x20) -+ | BCM2835_I2S_RX(0x20)); - - /* Clear FIFOs */ - bcm2835_i2s_clear_fifos(dev, true, true); - -From c2da3f61c8bcd26088c49ccc64da5fd09b9225fb Mon Sep 17 00:00:00 2001 +From 2bcac687459aa66aa7d10beb5839180c766cf514 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 096/119] rpi_display: add backlight driver and overlay +Subject: [PATCH 085/147] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -133818,10 +132837,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From a6b20426b48edbef48f39d0d7aeb7cf05e4c8546 Mon Sep 17 00:00:00 2001 +From 4ce4df9188ae128624edc9cfa5b1b9759227b6a1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 097/119] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 086/147] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -133833,10 +132852,10 @@ request that the VPU toggles LEDs. create mode 100644 drivers/gpio/gpio-bcm-virt.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index d7860614f87f532caeb21145c78352d38161b2a3..05ca35a0b2c431c39e1b207f560e1b11f118e6fe 100644 +index 5d457ff613259b5921e96eb1e3fab22bc5dd0d42..3f4fa61d2213c2996e5ac8fb9bbab977ebfbb2ac 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -143,6 +143,12 @@ config GPIO_BCM_KONA +@@ -144,6 +144,12 @@ config GPIO_BCM_KONA help Turn on GPIO support for Broadcom "Kona" chips. @@ -134047,10 +133066,10 @@ index 0000000000000000000000000000000000000000..f3e0f1620b979e4fa3c7e556eb785ac2 +MODULE_DESCRIPTION("brcmvirt GPIO driver"); +MODULE_ALIAS("platform:brcmvirt-gpio"); -From 06a331fcab9977b8975daca74240f95f353e8ad3 Mon Sep 17 00:00:00 2001 +From ddf79d660e8d582f6c91c76604d8073b1e8a02a8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 4 Mar 2016 12:49:09 +0000 -Subject: [PATCH 098/119] DRM_VC4: Allow to be built for ARCH_BCM270x +Subject: [PATCH 087/147] DRM_VC4: Allow to be built for ARCH_BCM270x --- drivers/gpu/drm/vc4/Kconfig | 2 +- @@ -134069,10 +133088,10 @@ index e53df59cb139f25f8e6ae916bca93abf0c49e063..f6e938208b73512f20eab46a383ca91b select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER -From 7bb919f581dce128a6fcd28da141aa413e427919 Mon Sep 17 00:00:00 2001 +From a3e6549aff9a6c8670cd7bc405f8d2e9d820e714 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 099/119] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 088/147] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -134101,10 +133120,10 @@ index 1b7331e40d795e1ec5482d6a82871bd5ce050b60..a04d27ef682792808301ac2d2bfb67d5 uap->old_cr = 0; uap->port.dev = dev; -From d6484eb31ca7b0298fce4f0ed2a0278e08a94d82 Mon Sep 17 00:00:00 2001 +From 065f196c93edb9f5b0f3264766b92f5f82ce273d Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 100/119] OF: DT-Overlay configfs interface +Subject: [PATCH 089/147] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -134536,10 +133555,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 5c8c09bd604f05bb436f7358360c0aecc48c2143 Mon Sep 17 00:00:00 2001 +From 907ea1dbbfe8226490230d0a8cb998e7bbd6b7c0 Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 101/119] brcm: adds support for BCM43341 wifi +Subject: [PATCH 090/147] brcm: adds support for BCM43341 wifi --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 ++ @@ -134579,10 +133598,10 @@ index 699f2c2782ee9d898a25c95e0c5d45744d0777ff..15598b3687a213d8c00d45965a6b9351 #define BRCM_CC_4335_CHIP_ID 0x4335 #define BRCM_CC_4339_CHIP_ID 0x4339 -From a88ce4432297fbdc7314529e5638b949f8ca7688 Mon Sep 17 00:00:00 2001 +From f181b58bb79caea1d1c2363d889df059973c60fd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 17:25:59 +0000 -Subject: [PATCH 102/119] brcmfmac: Disable power management +Subject: [PATCH 091/147] brcmfmac: Disable power management Disable wireless power saving in the brcmfmac WLAN driver. This is a temporary measure until the connectivity loss resulting from power @@ -134607,10 +133626,10 @@ index 62f475e31077ca1fa1df15863f02ee0911c46997..d001128266f462beee5f9672c64ed2c0 if (!check_vif_up(ifp->vif)) { -From 69772f124d1cb0d31de04c768dc779f2f8b118d6 Mon Sep 17 00:00:00 2001 +From 6010088f05386dacceb66c9763fe43709c497830 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 28 Apr 2016 17:13:47 +0100 -Subject: [PATCH 103/119] brcmfmac: Use original country code as a fallback +Subject: [PATCH 092/147] brcmfmac: Use original country code as a fallback Commit 73345fd212980d2e28a5c6d83801c903bd773680: @@ -134669,10 +133688,10 @@ index d001128266f462beee5f9672c64ed2c0d9200334..90eb79cc104427597046f2459e6f46de ccreq->country_abbrev[1] = alpha2[1]; ccreq->country_abbrev[2] = 0; -From c81a9772926ffe219c9ddb80ed38bd50c2e850aa Mon Sep 17 00:00:00 2001 +From 94fb23bdcbf1b378aef17dd99b0eb98231134e59 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 19 May 2016 15:36:09 +0100 -Subject: [PATCH 104/119] brcmfmac: Plug memory leak in brcmf_fill_bss_param +Subject: [PATCH 093/147] brcmfmac: Plug memory leak in brcmf_fill_bss_param See: https://github.com/raspberrypi/linux/issues/1471 @@ -134705,10 +133724,10 @@ index 90eb79cc104427597046f2459e6f46de09702784..27a59a9f7b9c108e728bdc7fc8d95139 static s32 -From 678e4a71084b991fca8366eda27c572c133e0e0c Mon Sep 17 00:00:00 2001 +From f13b38582b394ff9f9d5d692d67b3b1cfa16af07 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 105/119] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 094/147] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -134731,10 +133750,10 @@ index 0879d64b1caf58afb6e5d494c07d9ab7e7cdf983..5161ab30fd533d50f516bb93d5b9f402 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 070f632477a257c5732b1e2d3239ffbb8a8fd072 Mon Sep 17 00:00:00 2001 +From bd99b18113650a862bae15d942d1030273fdf8c0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 22 Jan 2016 13:06:39 -0800 -Subject: [PATCH 106/119] drm/vc4: Add a debugfs node for tracking execution +Subject: [PATCH 095/147] drm/vc4: Add a debugfs node for tracking execution state. Signed-off-by: Eric Anholt @@ -134794,10 +133813,10 @@ index 46899d6de6753c28c7ca6c721119a28d72792148..cbb1bc0b0db88f1c83ce3a630b2efe67 vc4_queue_hangcheck(struct drm_device *dev) { -From 280b96889f2a3892b44f4f03f56c0a229693a724 Mon Sep 17 00:00:00 2001 +From ac57b182e329a7e0d1735d60731ebb822694cc23 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 13:03:33 -0800 -Subject: [PATCH 107/119] drm/vc4: Include vc4_drm.h in uapi in downstream +Subject: [PATCH 096/147] drm/vc4: Include vc4_drm.h in uapi in downstream build. Signed-off-by: Eric Anholt @@ -134818,10 +133837,10 @@ index 9355dd8eff3ba39401dfe37e7fbf7737f0397f11..68828bf586f05a8d9b0a6ab409ee91a7 header-y += vmwgfx_drm.h header-y += msm_drm.h -From 54527e3981e953cc84e6e11bf99a18a8070c52c3 Mon Sep 17 00:00:00 2001 +From e5029b6e2fca6cc37234361691ac51e7eb94b08f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 17:23:15 +0100 -Subject: [PATCH 108/119] cpufreq: Temporarily ignore io_is_busy=1 +Subject: [PATCH 097/147] cpufreq: Temporarily ignore io_is_busy=1 To speed testing of the new sdhost driver that adapts to changes in core_freq, hack the on-demand governor to treat io_is_busy=1 as @@ -134852,10 +133871,10 @@ index 300163430516766d56b842d8d12dc33175eee66b..9ab7b40005cb7ddfafc3917dc874eea8 /* we need to re-evaluate prev_cpu_idle */ gov_update_cpu_data(dbs_data); -From c48aa30fc6858f37f1bf43538fbea1d9ca102f56 Mon Sep 17 00:00:00 2001 +From 632a36d60fa1de95ab6af836889bb6c6ac55c078 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Oct 2015 11:32:14 -0700 -Subject: [PATCH 109/119] drm/vc4: Force HDMI to connected. +Subject: [PATCH 098/147] drm/vc4: Force HDMI to connected. For some reason on the downstream tree, the HPD GPIO isn't working. @@ -134878,10 +133897,10 @@ index fd2644d231ff867a4409840eba7f8234a4a1faba..ed9c5274d06a215331aee44da1f7214a if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio) ^ vc4->hdmi->hpd_active_low) -From f6366a4c9cf5245af1f8c10d9c19ad287bb1bf02 Mon Sep 17 00:00:00 2001 +From b2b56335a92130edf9b40cd62bb9c23bcfbc0db3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 19 Apr 2016 15:55:02 -0700 -Subject: [PATCH 110/119] ARM: bcm2708: Enable building power domain driver. +Subject: [PATCH 099/147] ARM: bcm2708: Enable building power domain driver. Signed-off-by: Eric Anholt --- @@ -134901,10 +133920,10 @@ index 3066edea184d765a670ded0cead470597654abc1..e23518142ceac6651641cc30c327d60d select PM_GENERIC_DOMAINS if PM select PM_GENERIC_DOMAINS_OF if PM -From 00541946c0141e5eff08499e6560dbbf8b6bcc7c Mon Sep 17 00:00:00 2001 +From b9baf5ba1e0adb57f7d04aa3ca0ee39c7aa4a9fe Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 111/119] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 100/147] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -134924,10 +133943,10 @@ index f22e060709e547528b29b747f796b45c445d23fa..76b7bd7d9d33a0dcefcdb5fe3e0df4de MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From 510b1c017049ea1d1b27ddef1d2243b4afd48f3e Mon Sep 17 00:00:00 2001 +From 14357f1133ce255f61edfa89245805ee87a54bf6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 112/119] spi-bcm2835: Disable forced software CS +Subject: [PATCH 101/147] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -134961,10 +133980,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From df1eaf37c912a78982c325ff6d1726edc112fe05 Mon Sep 17 00:00:00 2001 +From 3b43c6a2aae0b1f58ff29b98affe4e96125ba470 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 28 Jul 2016 11:39:51 +0100 -Subject: [PATCH 113/119] config: Enable CONFIG_USER_NS +Subject: [PATCH 102/147] config: Enable CONFIG_USER_NS --- arch/arm/configs/bcm2709_defconfig | 2 +- @@ -135004,10 +134023,10 @@ index da2df3d30e15a55a34b45d3ebbf98e906da6379c..6c885f0518d0c015357a6fea1438841d CONFIG_BLK_DEV_INITRD=y CONFIG_EMBEDDED=y -From 6f5c348828f93b34955442c7dea5e9aacf2d1e96 Mon Sep 17 00:00:00 2001 +From 9c8942382f8910b8353b295a81ea943d8018029d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 9 Aug 2016 22:19:28 +0100 -Subject: [PATCH 114/119] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 103/147] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -135038,10 +134057,10 @@ index d22a2324085fbf61fbd8920362bfc7b9f72bebe3..c846c55075387398d9bcb0957e31f5c8 MODULE_PARM_DESC(packetsize, "Override the RX URB packet size"); -From b249cb38f2fe1ef603f8aec92ac3196803a894ce Mon Sep 17 00:00:00 2001 +From b6b81841cfbc8f3db456971abc4898ac1b8792f4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Aug 2016 13:21:32 +0100 -Subject: [PATCH 115/119] smsc95xx: squash: Bump to packetsize=4096 +Subject: [PATCH 104/147] smsc95xx: squash: Bump to packetsize=4096 --- drivers/net/usb/smsc95xx.c | 2 +- @@ -135061,10 +134080,10 @@ index c846c55075387398d9bcb0957e31f5c82fd7d58d..e663cd24653411e502deb28d0ea9b828 MODULE_PARM_DESC(packetsize, "Override the RX URB packet size"); -From 9e1e5a251e0acb18522805009b51acc1cbd0c047 Mon Sep 17 00:00:00 2001 +From 61efd212c2c8f321790755448af227781cab2f7f Mon Sep 17 00:00:00 2001 From: James Adams Date: Fri, 12 Aug 2016 14:35:00 +0100 -Subject: [PATCH 116/119] Add cm3 dts file +Subject: [PATCH 105/147] Add cm3 dts file --- arch/arm/boot/dts/Makefile | 1 + @@ -135267,10 +134286,10 @@ index 0000000000000000000000000000000000000000..6a3d2f21295a63e9211638b9e4ba2027 + }; +}; -From 5dd4fc9c7d2c31973201e48b108fd9c00b9c4820 Mon Sep 17 00:00:00 2001 +From c1d41dda2232bed75e5a2d62b70555d1bc289088 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Aug 2016 17:12:32 +0100 -Subject: [PATCH 117/119] config: Enable SENSORS_LM75 +Subject: [PATCH 106/147] config: Enable SENSORS_LM75 --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -135302,10 +134321,10 @@ index 6c885f0518d0c015357a6fea1438841db344cc46..7f02ad070f3f71c289a5e3d19f5eb682 CONFIG_SENSORS_SHTC1=m CONFIG_THERMAL=y -From 7c6676878e09288ad1aa958fff54f56624fef8f2 Mon Sep 17 00:00:00 2001 +From e87527376dcc111bbf382acbc6673eb0fd8572a2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Aug 2016 17:00:18 +0100 -Subject: [PATCH 118/119] config: Enable SERIAL_SC16IS7XX +Subject: [PATCH 107/147] config: Enable SERIAL_SC16IS7XX --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -135337,10 +134356,10 @@ index 7f02ad070f3f71c289a5e3d19f5eb68253efc8fe..4b50842b84daf91adb553be669737a71 CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y -From 628768a57451cad9149b6794b8ab83da65e1ea1a Mon Sep 17 00:00:00 2001 +From 5bd05abe9a475e10771ccc784b43aac60cfd532b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Aug 2016 15:46:21 +0100 -Subject: [PATCH 119/119] snd-bcm2835: Don't allow responses from VC to be +Subject: [PATCH 108/147] snd-bcm2835: Don't allow responses from VC to be interrupted by user signals There should always be a response, and retry after a signal interruption is not handled, so don't report @@ -135402,3 +134421,2763 @@ index 3de30945d8155b90d244734881a7caa81930fa7c..7ee436ca9fa2903d41d1bdd8f8f07740 __func__, instance->result); ret = -1; + +From 5f3f215791e1665c14498e6313885b1f20d36aec Mon Sep 17 00:00:00 2001 +From: Bruno George de Moraes +Date: Wed, 20 Aug 2014 23:53:57 -0300 +Subject: [PATCH 109/147] snd-bcm2835: Use bcm2835_hw params in preallocate + +--- + sound/arm/bcm2835-pcm.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index d2de13cbd76ed16634f27c0843474825671a28eb..71b128924affac2b7a01d1169e43d437bb1d0c1a 100755 +--- a/sound/arm/bcm2835-pcm.c ++++ b/sound/arm/bcm2835-pcm.c +@@ -518,9 +518,9 @@ int snd_bcm2835_new_pcm(bcm2835_chip_t * chip) + /* pre-allocation of buffers */ + /* NOTE: this may fail */ + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, +- snd_dma_continuous_data +- (GFP_KERNEL), 64 * 1024, +- 64 * 1024); ++ snd_dma_continuous_data (GFP_KERNEL), ++ snd_bcm2835_playback_hw.buffer_bytes_max, snd_bcm2835_playback_hw.buffer_bytes_max); ++ + + out: + mutex_unlock(&chip->audio_mutex); +@@ -550,9 +550,11 @@ int snd_bcm2835_new_spdif_pcm(bcm2835_chip_t * chip) + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, + &snd_bcm2835_playback_spdif_ops); + ++ /* pre-allocation of buffers */ ++ /* NOTE: this may fail */ + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, + snd_dma_continuous_data (GFP_KERNEL), +- 64 * 1024, 64 * 1024); ++ snd_bcm2835_playback_spdif_hw.buffer_bytes_max, snd_bcm2835_playback_spdif_hw.buffer_bytes_max); + out: + mutex_unlock(&chip->audio_mutex); + audio_info(" .. OUT\n"); + +From 521ba4f740bb9a4532d12435a0207dbf94bea9e2 Mon Sep 17 00:00:00 2001 +From: Bruno George de Moraes +Date: Tue, 30 Aug 2016 12:54:38 +0100 +Subject: [PATCH 110/147] dwc_otg: Use kzalloc when suitable + +--- + drivers/usb/host/dwc_otg/dummy_audio.c | 3 +-- + drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/drivers/usb/host/dwc_otg/dummy_audio.c b/drivers/usb/host/dwc_otg/dummy_audio.c +index 225decf765ce825b896ba98771ccb19c20d99404..f827102fa64414d0f6e6ad47948a87fa4ab97e69 100644 +--- a/drivers/usb/host/dwc_otg/dummy_audio.c ++++ b/drivers/usb/host/dwc_otg/dummy_audio.c +@@ -1377,10 +1377,9 @@ zero_bind (struct usb_gadget *gadget) + + + /* ok, we made sense of the hardware ... */ +- dev = kmalloc (sizeof *dev, SLAB_KERNEL); ++ dev = kzalloc (sizeof *dev, SLAB_KERNEL); + if (!dev) + return -ENOMEM; +- memset (dev, 0, sizeof *dev); + spin_lock_init (&dev->lock); + dev->gadget = gadget; + set_gadget_data (gadget, dev); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c +index 0eb0f3572d1230fdd23966c47ba9370d22bb8cb5..5624f32c9ea9117599df451af29fca2e3bca36de 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c +@@ -212,12 +212,11 @@ static struct usb_request *dwc_otg_pcd_alloc_request(struct usb_ep *ep, + DWC_WARN("%s() %s\n", __func__, "Invalid EP!\n"); + return 0; + } +- usb_req = kmalloc(sizeof(*usb_req), gfp_flags); ++ usb_req = kzalloc(sizeof(*usb_req), gfp_flags); + if (0 == usb_req) { + DWC_WARN("%s() %s\n", __func__, "request allocation failed!\n"); + return 0; + } +- memset(usb_req, 0, sizeof(*usb_req)); + usb_req->dma = DWC_DMA_ADDR_INVALID; + + return usb_req; + +From 68ddf2c90b80ac32610bdcc9eabec68b90b563ce Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 26 Apr 2016 11:44:59 -0700 +Subject: [PATCH 111/147] clk: bcm2835: Mark the VPU clock as critical + +The VPU clock is also the clock for our AXI bus, so we really can't +disable it. This might have happened during boot if, for example, +uart1 (aux_uart clock) probed and was then disabled before the other +consumers of the VPU clock had probed. + +v2: Rewrite to use a .flags in bcm2835_clock_data, since other clocks + will need this too. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 7a7970865c2d856b6b57113c2bb7e8074140a5dd..d9db03cb3fd84163f320dca6f2e533c61f61b5ad 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -443,6 +443,8 @@ struct bcm2835_clock_data { + /* Number of fractional bits in the divider */ + u32 frac_bits; + ++ u32 flags; ++ + bool is_vpu_clock; + bool is_mash_clock; + }; +@@ -1230,7 +1232,7 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + init.parent_names = parents; + init.num_parents = data->num_mux_parents; + init.name = data->name; +- init.flags = CLK_IGNORE_UNUSED; ++ init.flags = data->flags | CLK_IGNORE_UNUSED; + + if (data->is_vpu_clock) { + init.ops = &bcm2835_vpu_clock_clk_ops; +@@ -1649,6 +1651,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_VPUDIV, + .int_bits = 12, + .frac_bits = 8, ++ .flags = CLK_IS_CRITICAL, + .is_vpu_clock = true), + + /* clocks with per parent mux */ + +From 4c4760e3f9153af7fc20817dd0e4990e9dd0b5d5 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 9 May 2016 17:28:18 -0700 +Subject: [PATCH 112/147] clk: bcm2835: Mark GPIO clocks enabled at boot as + critical. + +These divide off of PLLD_PER and are used for the ethernet and wifi +PHYs source PLLs. Neither of them is currently represented by a phy +device that would grab the clock for us. + +This keeps other drivers from killing the networking PHYs when they +disable their own clocks and trigger PLLD_PER's refcount going to 0. + +v2: Skip marking as critical if they aren't on at boot. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index d9db03cb3fd84163f320dca6f2e533c61f61b5ad..f6bbe8d5929828048114286ec29a33e02519eab8 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1234,6 +1234,15 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + init.name = data->name; + init.flags = data->flags | CLK_IGNORE_UNUSED; + ++ /* ++ * Some GPIO clocks for ethernet/wifi PLLs are marked as ++ * critical (since some platforms use them), but if the ++ * firmware didn't have them turned on then they clearly ++ * aren't actually critical. ++ */ ++ if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0) ++ init.flags &= ~CLK_IS_CRITICAL; ++ + if (data->is_vpu_clock) { + init.ops = &bcm2835_vpu_clock_clk_ops; + } else { +@@ -1708,13 +1717,15 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_GP1DIV, + .int_bits = 12, + .frac_bits = 12, ++ .flags = CLK_IS_CRITICAL, + .is_mash_clock = true), + [BCM2835_CLOCK_GP2] = REGISTER_PER_CLK( + .name = "gp2", + .ctl_reg = CM_GP2CTL, + .div_reg = CM_GP2DIV, + .int_bits = 12, +- .frac_bits = 12), ++ .frac_bits = 12, ++ .flags = CLK_IS_CRITICAL), + + /* HDMI state machine */ + [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( + +From 079f69c976a3df1d2727691672b125682a743b07 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 26 Apr 2016 12:39:45 -0700 +Subject: [PATCH 113/147] clk: bcm2835: Skip PLLC clocks when deciding on a new + clock parent + +If the firmware had set up a clock to source from PLLC, go along with +it. But if we're looking for a new parent, we don't want to switch it +to PLLC because the firmware will force PLLC (and thus the AXI bus +clock) to different frequencies during over-temp/under-voltage, +without notification to Linux. + +On my system, this moves the Linux-enabled HDMI state machine and DSI1 +escape clock over to plld_per from pllc_per. EMMC still ends up on +pllc_per, because the firmware had set it up to use that. + +Signed-off-by: Eric Anholt +Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") +--- + drivers/clk/bcm/clk-bcm2835.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index f6bbe8d5929828048114286ec29a33e02519eab8..e527649ee5e32d20cebd762f4badbfca06657a84 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1008,16 +1008,28 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + return 0; + } + ++static bool ++bcm2835_clk_is_pllc(struct clk_hw *hw) ++{ ++ if (!hw) ++ return false; ++ ++ return strncmp(clk_hw_get_name(hw), "pllc", 4) == 0; ++} ++ + static int bcm2835_clock_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + struct clk_hw *parent, *best_parent = NULL; ++ bool current_parent_is_pllc; + unsigned long rate, best_rate = 0; + unsigned long prate, best_prate = 0; + size_t i; + u32 div; + ++ current_parent_is_pllc = bcm2835_clk_is_pllc(clk_hw_get_parent(hw)); ++ + /* + * Select parent clock that results in the closest but lower rate + */ +@@ -1025,6 +1037,17 @@ static int bcm2835_clock_determine_rate(struct clk_hw *hw, + parent = clk_hw_get_parent_by_index(hw, i); + if (!parent) + continue; ++ ++ /* ++ * Don't choose a PLLC-derived clock as our parent ++ * unless it had been manually set that way. PLLC's ++ * frequency gets adjusted by the firmware due to ++ * over-temp or under-voltage conditions, without ++ * prior notification to our clock consumer. ++ */ ++ if (bcm2835_clk_is_pllc(parent) && !current_parent_is_pllc) ++ continue; ++ + prate = clk_hw_get_rate(parent); + div = bcm2835_clock_choose_div(hw, req->rate, prate, true); + rate = bcm2835_clock_rate_from_divisor(clock, prate, div); + +From d84bb6117c42938921f30a7d416671c1fc2ba7f9 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 1 Jun 2016 12:05:35 -0700 +Subject: [PATCH 114/147] clk: bcm2835: Mark the CM SDRAM clock's parent as + critical + +While the SDRAM is being driven by its dedicated PLL most of the time, +there is a little loop running in the firmware that periodically turns +on the CM SDRAM clock (using its pre-initialized parent) and switches +SDRAM to using the CM clock to do PVT recalibration. + +This avoids system hangs if we choose SDRAM's parent for some other +clock, then disable that clock. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index e527649ee5e32d20cebd762f4badbfca06657a84..fbf616021704178a9d007219a0ea2a9f1704f0a6 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -36,6 +36,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -1827,6 +1828,25 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .ctl_reg = CM_PERIICTL), + }; + ++/* ++ * Permanently take a reference on the parent of the SDRAM clock. ++ * ++ * While the SDRAM is being driven by its dedicated PLL most of the ++ * time, there is a little loop running in the firmware that ++ * periodically switches the SDRAM to using our CM clock to do PVT ++ * recalibration, with the assumption that the previously configured ++ * SDRAM parent is still enabled and running. ++ */ ++static int bcm2835_mark_sdc_parent_critical(struct clk *sdc) ++{ ++ struct clk *parent = clk_get_parent(sdc); ++ ++ if (IS_ERR(parent)) ++ return PTR_ERR(parent); ++ ++ return clk_prepare_enable(parent); ++} ++ + static int bcm2835_clk_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; +@@ -1836,6 +1856,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + const struct bcm2835_clk_desc *desc; + const size_t asize = ARRAY_SIZE(clk_desc_array); + size_t i; ++ int ret; + + cprman = devm_kzalloc(dev, + sizeof(*cprman) + asize * sizeof(*clks), +@@ -1866,6 +1887,10 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + clks[i] = desc->clk_register(cprman, desc->data); + } + ++ ret = bcm2835_mark_sdc_parent_critical(clks[BCM2835_CLOCK_SDRAM]); ++ if (ret) ++ return ret; ++ + return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, + &cprman->onecell); + } + +From a9c92046889196e4a7c209a1b7d028eb70f40228 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 25 Apr 2016 06:54:57 +0000 +Subject: [PATCH 115/147] ARM: bcm2708: enable clock manager by default + +Enable the clock manager by default. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 74434b986e3fbb257debfc79caef9fa68f750043..416037450277cd17c280e2b5f9f5423b1cd5502b 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -113,7 +113,6 @@ + * oscillator. + */ + clocks = <&clk_osc>; +- status = "disabled"; + }; + + random: rng@7e104000 { + +From 24ec201f035e0d68e1de98e01255054893da7d33 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 25 Apr 2016 07:56:13 +0000 +Subject: [PATCH 116/147] ARM: 2708: i2s: removed clock registers and added + clock + +Removed clock registers from reg and added clock to i2s devicetree node. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 416037450277cd17c280e2b5f9f5423b1cd5502b..9af850fc2cacfccd4ec6262992e9248263788dd1 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -159,8 +159,8 @@ + i2s: i2s@7e203000 { + compatible = "brcm,bcm2835-i2s"; + #sound-dai-cells = <0>; +- reg = <0x7e203000 0x24>, +- <0x7e101098 0x08>; ++ reg = <0x7e203000 0x24>; ++ clocks = <&cprman BCM2835_CLOCK_PCM>; + + dmas = <&dma 2>, <&dma 3>; + dma-names = "tx", "rx"; + +From 779b2c1f6af640da2067e648f9148fb56efd5ed0 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 10:31:04 +0000 +Subject: [PATCH 117/147] ARM: bcm2708: use correct device-tree node names for + serial + +Upstream mandates the use of "serial" as name inside the device-tree. +Note that this does not affect the use of the alias - there +uart0 and uart1 are permissible. + +This also fixed the patch references inside the overlays for the rpi3. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 4 ++-- + arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts | 4 ++-- + arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 9af850fc2cacfccd4ec6262992e9248263788dd1..65f83cfd26c016fe5c7438559a8c9e023603268c 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -133,7 +133,7 @@ + #interrupt-cells = <2>; + }; + +- uart0: uart@7e201000 { ++ uart0: serial@7e201000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x7e201000 0x1000>; + interrupts = <2 25>; +@@ -234,7 +234,7 @@ + status = "disabled"; + }; + +- uart1: uart@7e215040 { ++ uart1: serial@7e215040 { + compatible = "brcm,bcm2835-aux-uart", "ns16550"; + reg = <0x7e215040 0x40>; + interrupts = <1 29>; +diff --git a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +index 68f6069dd24cbf6a2ed11365ac0717e36879abe3..87cf345f9641e62c5ed496c238333716cc5b27e6 100644 +--- a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +@@ -39,8 +39,8 @@ + fragment@3 { + target-path = "/aliases"; + __overlay__ { +- serial0 = "/soc/uart@7e201000"; +- serial1 = "/soc/uart@7e215040"; ++ serial0 = "/soc/serial@7e201000"; ++ serial1 = "/soc/serial@7e215040"; + }; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +index 17d04cf87195a6ff192e1ddbe4f92b1afa9e5ddb..18f77453c38dbbf33f3726a5b4cce15b9f20f390 100644 +--- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +@@ -57,8 +57,8 @@ + fragment@4 { + target-path = "/aliases"; + __overlay__ { +- serial0 = "/soc/uart@7e201000"; +- serial1 = "/soc/uart@7e215040"; ++ serial0 = "/soc/serial@7e201000"; ++ serial1 = "/soc/serial@7e215040"; + }; + }; + }; + +From 5e863822237919d85b8fe5201fba54d498405055 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 10:52:17 +0000 +Subject: [PATCH 118/147] ARM: bcm2708: moved uart0 to use new clock framework + +Moved uart0 to use new clock framework. +At the same time removed the fixed clock clk_uart0 +and the corresponding references, as the clock is now +read directly from the configured clocks. + +If it ever becomes necessary the following can get added +to modify the base clock rate later: + assigned-clocks = <&clocks BCM2835_CLOCK_UART>; + assigned-clock-rates = ; + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 1 - + arch/arm/boot/dts/bcm2708-rpi-b.dts | 1 - + arch/arm/boot/dts/bcm2708-rpi-cm.dts | 1 - + arch/arm/boot/dts/bcm2708_common.dtsi | 21 +++------------------ + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 - + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 1 - + 6 files changed, 3 insertions(+), 23 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +index db2705afa4e2229c961fe88bcae46233a4ce4542..ddccaee96185418107727fb53a0b12e9007f8347 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +@@ -133,7 +133,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts +index beae0371477cc41f27006ef3f1ef7268839177df..022055b553d87655c17716229884975210159ee7 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts +@@ -127,7 +127,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts +index cd0e1acc22f8ded801f29d331570828e5582247b..d2dcc9c156b32a91a45c26b460fa971abd0dbdf5 100755 +--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts +@@ -88,7 +88,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 65f83cfd26c016fe5c7438559a8c9e023603268c..a93c5a20e3a19a36441f213bf8e9306e90c60842 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -134,10 +134,11 @@ + }; + + uart0: serial@7e201000 { +- compatible = "arm,pl011", "arm,primecell"; ++ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; + reg = <0x7e201000 0x1000>; + interrupts = <2 25>; +- clocks = <&clk_uart0 &clk_apb_p>; ++ clocks = <&cprman BCM2835_CLOCK_UART>, ++ <&cprman BCM2835_CLOCK_VPU>; + clock-names = "uartclk","apb_pclk"; + arm,primecell-periphid = <0x00241011>; // For an explanation, see + // https://github.com/raspberrypi/linux/commit/13731d862cf5219216533a3b0de052cee4cc5038 +@@ -421,22 +422,6 @@ + clock-frequency = <250000000>; + }; + +- clk_uart0: clock@2 { +- compatible = "fixed-clock"; +- reg = <2>; +- #clock-cells = <0>; +- clock-output-names = "uart0_pclk"; +- clock-frequency = <3000000>; +- }; +- +- clk_apb_p: clock@3 { +- compatible = "fixed-clock"; +- reg = <3>; +- #clock-cells = <0>; +- clock-output-names = "apb_pclk"; +- clock-frequency = <126000000>; +- }; +- + clk_pwm: clock@4 { + compatible = "fixed-clock"; + reg = <4>; +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +index eca72bd0d6e891b0096ac97b68c2da92199aa851..8eba22a66d986cf819b10b7d28de959188c27b55 100644 +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +@@ -133,7 +133,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index a72e6e5a0ac0b2492db3d8034a5196b3e19ae008..55ddafda0b17e480e129dc84c93e6743ff533ec1 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -184,7 +184,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; + +From 2d674159f8be281928a10e67ac6f9eb7b037feab Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:12:37 +0000 +Subject: [PATCH 119/147] ARM: bcm2708: move spi0 to use new clock framework + +use spi0 to use new clock framwork + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index a93c5a20e3a19a36441f213bf8e9306e90c60842..2eef648c4da0fe18c7134154a67b1529b36b1eef 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -172,7 +172,7 @@ + compatible = "brcm,bcm2835-spi"; + reg = <0x7e204000 0x1000>; + interrupts = <2 22>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + +From ff37be59358e20ca7569922af6bccb41ef9396db Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:17:32 +0000 +Subject: [PATCH 120/147] ARM: bcm2708: move i2c to use new clock framework + +move i2c to use the new clock framework instead of the fixed clock + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 2eef648c4da0fe18c7134154a67b1529b36b1eef..ac45bbd4e72c2a1668424ee8f714bd9f605eaccd 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -190,7 +190,7 @@ + compatible = "brcm,bcm2708-i2c"; + reg = <0x7e205000 0x1000>; + interrupts = <2 21>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; +@@ -286,7 +286,7 @@ + compatible = "brcm,bcm2708-i2c"; + reg = <0x7e804000 0x1000>; + interrupts = <2 21>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; +@@ -299,7 +299,7 @@ + compatible = "brcm,bcm2708-i2c"; + reg = <0x7e805000 0x1000>; + interrupts = <2 21>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + +From 548f9d93addda4dbbe5668eba8cf4275afe5b4cc Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:19:11 +0000 +Subject: [PATCH 121/147] ARM: bcm2708: move pwm to new clock framework + +Move PWM to use the new clock framework + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index ac45bbd4e72c2a1668424ee8f714bd9f605eaccd..4177be1f2d4404a775fe3e993f020fb573cee7f2 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -222,7 +222,9 @@ + pwm: pwm@7e20c000 { + compatible = "brcm,bcm2835-pwm"; + reg = <0x7e20c000 0x28>; +- clocks = <&clk_pwm>; ++ clocks = <&cprman BCM2835_CLOCK_PWM>; ++ assigned-clocks = <&cprman BCM2835_CLOCK_PWM>; ++ assigned-clock-rates = <10000000>; + #pwm-cells = <2>; + status = "disabled"; + }; + +From 807fd4dd0d41b0047e812d02792584b135a17c23 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:23:53 +0000 +Subject: [PATCH 122/147] ARM: bcm2708: fix auxiliar clock provider to use + clock framework + +Fix the auxiliar clock provider to use the clock framework + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 4177be1f2d4404a775fe3e993f020fb573cee7f2..f1b813d145874205a33068d278c0e79c6355ef20 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -229,12 +229,11 @@ + status = "disabled"; + }; + +- aux: aux@0x7e215004 { ++ aux: aux@0x7e215000 { + compatible = "brcm,bcm2835-aux"; + #clock-cells = <1>; + reg = <0x7e215000 0x8>; +- clocks = <&clk_core>; +- status = "disabled"; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + }; + + uart1: serial@7e215040 { + +From ebbf9fb89d924400a24678ee7cb17ff23e5e74cb Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:32:21 +0000 +Subject: [PATCH 123/147] ARM: bcm2708: fix register range of spi-aux + +Fix the register range of the spi-aux devices, +as they do not control the gate. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index f1b813d145874205a33068d278c0e79c6355ef20..37cde9cf317e6c5c76bcf3676a296696f574ac3d 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -248,7 +248,7 @@ + + spi1: spi@7e215080 { + compatible = "brcm,bcm2835-aux-spi"; +- reg = <0x7e215080 0x40>, <0x7e215000 0x8>; ++ reg = <0x7e215080 0x40>; + interrupts = <1 29>; + clocks = <&aux BCM2835_AUX_CLOCK_SPI1>; + #address-cells = <1>; +@@ -258,7 +258,7 @@ + + spi2: spi@7e2150C0 { + compatible = "brcm,bcm2835-aux-spi"; +- reg = <0x7e2150C0 0x40>, <0x7e215000 0x8>; ++ reg = <0x7e2150C0 0x40>; + interrupts = <1 29>; + clocks = <&aux BCM2835_AUX_CLOCK_SPI2>; + #address-cells = <1>; + +From ff1aef56a692c37e844f4b3ba0e7a2a8fa10cde5 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 12:12:16 +0000 +Subject: [PATCH 124/147] ARM: bcm2708: move to new clock manager and driver + for aux-uart + +Move to new aux-uart driver (from upstream) and enable it correctly +in the device tree + +Note that this may also solve the "serial not 115200 baud" +issue on the rpi3... + +With an extension to the driver (requesting clock change +notifications) the driver could change the baud divider when +such a clock change occurs... + +It still would require some communication between the firmware +and the kernel, so that this would get propagated. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 15 ++------------- + arch/arm/configs/bcm2709_defconfig | 3 +++ + arch/arm/configs/bcmrpi_defconfig | 3 +++ + drivers/tty/serial/8250/Kconfig | 2 +- + 4 files changed, 9 insertions(+), 14 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 37cde9cf317e6c5c76bcf3676a296696f574ac3d..011ef9786d46b4ba8db0c672339b7f22b5b75e08 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -237,12 +237,10 @@ + }; + + uart1: serial@7e215040 { +- compatible = "brcm,bcm2835-aux-uart", "ns16550"; ++ compatible = "brcm,bcm2835-aux-uart"; + reg = <0x7e215040 0x40>; + interrupts = <1 29>; +- clocks = <&clk_uart1>; +- reg-shift = <2>; +- no-loopback-test; ++ clocks = <&aux BCM2835_AUX_CLOCK_UART>; + status = "disabled"; + }; + +@@ -431,15 +429,6 @@ + clock-frequency = <100000000>; + }; + +- clk_uart1: clock@5 { +- compatible = "fixed-factor-clock"; +- reg = <5>; +- clocks = <&clk_core>; +- #clock-cells = <0>; +- clock-div = <1>; +- clock-mult = <2>; +- }; +- + /* The oscillator is the root of the clock tree. */ + clk_osc: clock@6 { + compatible = "fixed-clock"; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index e85cf56113b432221816008fcf8453ae57f6933b..76340ce6ccc43a4bb24db414b75814e4a9e10ddc 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -595,6 +595,9 @@ CONFIG_SERIAL_8250_CONSOLE=y + # CONFIG_SERIAL_8250_DMA is not set + CONFIG_SERIAL_8250_NR_UARTS=1 + CONFIG_SERIAL_8250_RUNTIME_UARTS=0 ++CONFIG_SERIAL_8250_EXTENDED=y ++CONFIG_SERIAL_8250_SHARE_IRQ=y ++CONFIG_SERIAL_8250_BCM2835AUX=y + CONFIG_SERIAL_OF_PLATFORM=y + CONFIG_SERIAL_AMBA_PL011=y + CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 4b50842b84daf91adb553be669737a71f6837dc8..5535fee75c1a31c4fe014b1551af763fb2e7c289 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -587,6 +587,9 @@ CONFIG_SERIAL_8250_CONSOLE=y + # CONFIG_SERIAL_8250_DMA is not set + CONFIG_SERIAL_8250_NR_UARTS=1 + CONFIG_SERIAL_8250_RUNTIME_UARTS=0 ++CONFIG_SERIAL_8250_EXTENDED=y ++CONFIG_SERIAL_8250_SHARE_IRQ=y ++CONFIG_SERIAL_8250_BCM2835AUX=y + CONFIG_SERIAL_OF_PLATFORM=y + CONFIG_SERIAL_AMBA_PL011=y + CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig +index e46761d20f7b4c780784d48c9f8de23f47f5134c..1232132f218b5c09dd46f3e9f541ea7c6f34b360 100644 +--- a/drivers/tty/serial/8250/Kconfig ++++ b/drivers/tty/serial/8250/Kconfig +@@ -291,7 +291,7 @@ config SERIAL_8250_ACORN + + config SERIAL_8250_BCM2835AUX + tristate "BCM2835 auxiliar mini UART support" +- depends on ARCH_BCM2835 || COMPILE_TEST ++ depends on ARCH_BCM2708 || ARCH_BCM2709 || ARCH_BCM2835 || COMPILE_TEST + depends on SERIAL_8250 && SERIAL_8250_SHARE_IRQ + help + Support for the BCM2835 auxiliar mini UART. + +From 53718da25dc6278a2c002de3583e7f0801f11b01 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 12:44:22 +0000 +Subject: [PATCH 125/147] ARM: bcm2708: remove pwm clock + +Remove no longer necessary fixed pwm clock. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 011ef9786d46b4ba8db0c672339b7f22b5b75e08..aa6005c2460df08cf2f102148be251a7a57d0bdf 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -421,14 +421,6 @@ + clock-frequency = <250000000>; + }; + +- clk_pwm: clock@4 { +- compatible = "fixed-clock"; +- reg = <4>; +- #clock-cells = <0>; +- clock-output-names = "pwm"; +- clock-frequency = <100000000>; +- }; +- + /* The oscillator is the root of the clock tree. */ + clk_osc: clock@6 { + compatible = "fixed-clock"; + +From a1289638abab86e2a0a6e4454ce5dab89d9974ed Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 14:59:21 +0000 +Subject: [PATCH 126/147] MISC: bcm2835: smi: use clock manager and fix reload + issues + +Use clock manager instead of self-made clockmanager. + +Also fix some error paths that showd up during development +(especially missing release of dma resources on rmmod) + +Signed-off-by: Martin Sperl +--- + drivers/misc/bcm2835_smi.c | 86 +++++++++++++++------------------------------- + 1 file changed, 28 insertions(+), 58 deletions(-) + +diff --git a/drivers/misc/bcm2835_smi.c b/drivers/misc/bcm2835_smi.c +index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e50d3fbec2 100644 +--- a/drivers/misc/bcm2835_smi.c ++++ b/drivers/misc/bcm2835_smi.c +@@ -34,6 +34,7 @@ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#include + #include + #include + #include +@@ -62,7 +63,7 @@ + struct bcm2835_smi_instance { + struct device *dev; + struct smi_settings settings; +- __iomem void *smi_regs_ptr, *cm_smi_regs_ptr; ++ __iomem void *smi_regs_ptr; + dma_addr_t smi_regs_busaddr; + + struct dma_chan *dma_chan; +@@ -72,8 +73,7 @@ struct bcm2835_smi_instance { + + struct scatterlist buffer_sgl; + +- int clock_source; +- int clock_divisor; ++ struct clk *clk; + + /* Sometimes we are called into in an atomic context (e.g. by + JFFS2 + MTD) so we can't use a mutex */ +@@ -82,42 +82,6 @@ struct bcm2835_smi_instance { + + /**************************************************************************** + * +-* SMI clock manager setup +-* +-***************************************************************************/ +- +-static inline void write_smi_cm_reg(struct bcm2835_smi_instance *inst, +- u32 val, unsigned reg) +-{ +- writel(CM_PWD | val, inst->cm_smi_regs_ptr + reg); +-} +- +-static inline u32 read_smi_cm_reg(struct bcm2835_smi_instance *inst, +- unsigned reg) +-{ +- return readl(inst->cm_smi_regs_ptr + reg); +-} +- +-static void smi_setup_clock(struct bcm2835_smi_instance *inst) +-{ +- dev_dbg(inst->dev, "Setting up clock..."); +- /* Disable SMI clock and wait for it to stop. */ +- write_smi_cm_reg(inst, 0, CM_SMI_CTL); +- while (read_smi_cm_reg(inst, CM_SMI_CTL) & CM_SMI_CTL_BUSY) +- ; +- +- write_smi_cm_reg(inst, (inst->clock_divisor << CM_SMI_DIV_DIVI_OFFS), +- CM_SMI_DIV); +- write_smi_cm_reg(inst, (inst->clock_source << CM_SMI_CTL_SRC_OFFS), +- CM_SMI_CTL); +- +- /* Enable the clock */ +- write_smi_cm_reg(inst, (inst->clock_source << CM_SMI_CTL_SRC_OFFS) | +- CM_SMI_CTL_ENAB, CM_SMI_CTL); +-} +- +-/**************************************************************************** +-* + * SMI peripheral setup + * + ***************************************************************************/ +@@ -894,42 +858,40 @@ static int bcm2835_smi_probe(struct platform_device *pdev) + struct device_node *node = dev->of_node; + struct resource *ioresource; + struct bcm2835_smi_instance *inst; ++ const __be32 *addr; + ++ /* We require device tree support */ ++ if (!node) ++ return -EINVAL; + /* Allocate buffers and instance data */ +- + inst = devm_kzalloc(dev, sizeof(struct bcm2835_smi_instance), + GFP_KERNEL); +- + if (!inst) + return -ENOMEM; + + inst->dev = dev; + spin_lock_init(&inst->transaction_lock); + +- /* We require device tree support */ +- if (!node) +- return -EINVAL; +- + ioresource = platform_get_resource(pdev, IORESOURCE_MEM, 0); + inst->smi_regs_ptr = devm_ioremap_resource(dev, ioresource); +- ioresource = platform_get_resource(pdev, IORESOURCE_MEM, 1); +- inst->cm_smi_regs_ptr = devm_ioremap_resource(dev, ioresource); +- inst->smi_regs_busaddr = be32_to_cpu( +- *of_get_address(node, 0, NULL, NULL)); +- of_property_read_u32(node, +- "brcm,smi-clock-source", +- &inst->clock_source); +- of_property_read_u32(node, +- "brcm,smi-clock-divisor", +- &inst->clock_divisor); ++ if (IS_ERR(inst->smi_regs_ptr)) { ++ err = PTR_ERR(inst->smi_regs_ptr); ++ goto err; ++ } ++ addr = of_get_address(node, 0, NULL, NULL); ++ inst->smi_regs_busaddr = be32_to_cpu(addr); + + err = bcm2835_smi_dma_setup(inst); + if (err) +- return err; ++ goto err; + +- /* Finally, do peripheral setup */ ++ /* request clock */ ++ inst->clk = devm_clk_get(dev, NULL); ++ if (!inst->clk) ++ goto err; ++ clk_prepare_enable(inst->clk); + +- smi_setup_clock(inst); ++ /* Finally, do peripheral setup */ + smi_setup_regs(inst); + + platform_set_drvdata(pdev, inst); +@@ -937,6 +899,9 @@ static int bcm2835_smi_probe(struct platform_device *pdev) + dev_info(inst->dev, "initialised"); + + return 0; ++err: ++ kfree(inst); ++ return err; + } + + /**************************************************************************** +@@ -950,6 +915,11 @@ static int bcm2835_smi_remove(struct platform_device *pdev) + struct bcm2835_smi_instance *inst = platform_get_drvdata(pdev); + struct device *dev = inst->dev; + ++ dmaengine_terminate_all(inst->dma_chan); ++ dma_release_channel(inst->dma_chan); ++ ++ clk_disable_unprepare(inst->clk); ++ + dev_info(dev, "SMI device removed - OK"); + return 0; + } + +From e748d263338f572b6121a169920e4cfc7eff3bfa Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 15:02:23 +0000 +Subject: [PATCH 127/147] ARM: bcm2835: move smi to use clock framework + +Move smi to use clock framework. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index aa6005c2460df08cf2f102148be251a7a57d0bdf..d757ca03a4a35f5da464667b6897a654a69ca0b8 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -306,10 +306,11 @@ + + smi: smi@7e600000 { + compatible = "brcm,bcm2835-smi"; +- reg = <0x7e600000 0x44>, <0x7e1010b0 0x8>; ++ reg = <0x7e600000 0x100>; + interrupts = <2 16>; +- brcm,smi-clock-source = <6>; +- brcm,smi-clock-divisor = <4>; ++ clocks = <&cprman BCM2835_CLOCK_SMI>; ++ assigned-clocks = <&cprman BCM2835_CLOCK_SMI>; ++ assigned-clock-rates = <125000000>; + dmas = <&dma 4>; + dma-names = "rx-tx"; + status = "disabled"; + +From d052cbb7659d7344a9e62bd9288c943a0841e5bc Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 13:04:12 +0000 +Subject: [PATCH 128/147] ARM: bcm2708: move mmc to use clock framework + +Move mmc to use clock framework. + +For some reason the emmc clock dirver does not claim the +clock - enable count stays at 0 for the emmc clock. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index d757ca03a4a35f5da464667b6897a654a69ca0b8..9689b971debfb2368da9f56cac2a4e04a1c6dd17 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -268,7 +268,7 @@ + compatible = "brcm,bcm2835-mmc"; + reg = <0x7e300000 0x100>; + interrupts = <2 30>; +- clocks = <&clk_mmc>; ++ clocks = <&cprman BCM2835_CLOCK_EMMC>; + dmas = <&dma 11>; + dma-names = "rx-tx"; + brcm,overclock-50 = <0>; +@@ -414,14 +414,6 @@ + clock-frequency = <250000000>; + }; + +- clk_mmc: clock@1 { +- compatible = "fixed-clock"; +- reg = <1>; +- #clock-cells = <0>; +- clock-output-names = "mmc"; +- clock-frequency = <250000000>; +- }; +- + /* The oscillator is the root of the clock tree. */ + clk_osc: clock@6 { + compatible = "fixed-clock"; + +From ccfa547a1b786cb56caae1ffc9355b5abe9479c7 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 13:19:51 +0000 +Subject: [PATCH 129/147] ARM: bcm2708: move sdhost to use clock framework + +Move the sdhost device to use the clock framework. + +Unfortunately I can not test it on my CM, as it seem as if +there is no overlay that would enable sdhost and change the +gpio-mux to the correct ALT0 (from Alt3 from mmc). + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 9689b971debfb2368da9f56cac2a4e04a1c6dd17..74b8b67dbc73ddd6fa36b3ae6df96c29dc5e27b0 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -149,7 +149,7 @@ + compatible = "brcm,bcm2835-sdhost"; + reg = <0x7e202000 0x100>; + interrupts = <2 24>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + dmas = <&dma 13>; + dma-names = "rx-tx"; + brcm,overclock-50 = <0>; + +From 1b5a2538f7571f2b466a33e3c454fb2bdeb8c1cf Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 15:11:24 +0000 +Subject: [PATCH 130/147] ARM: bcm2708: remove clk_core as it is no longer used + +Remove clk_core from device tree as it is no longer used. +Any "modification" to the core_clock in the bootloader is now +automatically detected via the cnew clockmgr. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 1 - + arch/arm/boot/dts/bcm2708-rpi-b.dts | 1 - + arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 2 -- + arch/arm/boot/dts/bcm2708_common.dtsi | 8 -------- + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 - + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 1 - + 6 files changed, 14 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +index ddccaee96185418107727fb53a0b12e9007f8347..6c16c325cd2887a42c42665273834618c1937918 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +@@ -142,7 +142,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts +index 022055b553d87655c17716229884975210159ee7..7c132437671d43e76445a4bf1184cc9a316b0965 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts +@@ -136,7 +136,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +index 90e330d1978da8624c042d52a38aa5d6d95d2377..f07609d97225b355dd2b6981d4f1fa28d0d40950 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi ++++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +@@ -38,8 +38,6 @@ + + / { + __overrides__ { +- core_freq = <&clk_core>,"clock-frequency:0"; +- + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; + act_led_trigger = <&act_led>,"linux,default-trigger"; +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 74b8b67dbc73ddd6fa36b3ae6df96c29dc5e27b0..7df436bea6cbdca226e75c687c1518114ae49c7d 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -406,14 +406,6 @@ + #address-cells = <1>; + #size-cells = <0>; + +- clk_core: clock@0 { +- compatible = "fixed-clock"; +- reg = <0>; +- #clock-cells = <0>; +- clock-output-names = "core"; +- clock-frequency = <250000000>; +- }; +- + /* The oscillator is the root of the clock tree. */ + clk_osc: clock@6 { + compatible = "fixed-clock"; +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +index 8eba22a66d986cf819b10b7d28de959188c27b55..74fe4cc1d667e9508ca860bcc8c837fed0cbb855 100644 +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +@@ -142,7 +142,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 55ddafda0b17e480e129dc84c93e6743ff533ec1..037ed41b140c448940c4a04d235fa6e6898265d3 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -193,7 +193,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; + +From 26c97e35ac46e2738ca4c8b92efdd77ce5215ed2 Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Tue, 16 Aug 2016 20:07:38 +0100 +Subject: [PATCH 131/147] CM3: ARM: bcm2708: moved uart0 to use new clock + framework + +Moved uart0 to use new clock framework. +At the same time removed the fixed clock clk_uart0 +and the corresponding references, as the clock is now +read directly from the configured clocks. + +If it ever becomes necessary the following can get added +to modify the base clock rate later: + assigned-clocks = <&clocks BCM2835_CLOCK_UART>; + assigned-clock-rates = ; + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +index 6a3d2f21295a63e9211638b9e4ba202753c8181b..f637da1d3b85dfc79e88b4bf0b3ec12417ba2c21 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +@@ -149,7 +149,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; + +From a563f77c9b60043a9037e3023564a6ae1f29619e Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Tue, 16 Aug 2016 20:09:33 +0100 +Subject: [PATCH 132/147] CM3: ARM: bcm2708: remove clk_core as it is no longer + used + +Remove clk_core from device tree as it is no longer used. +Any "modification" to the core_clock in the bootloader is now +automatically detected via the cnew clockmgr. + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +index f637da1d3b85dfc79e88b4bf0b3ec12417ba2c21..a5d57893d5799e57ffe9b8efe553a03ec4bde007 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +@@ -158,7 +158,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; + +From 113cddf45655ac1febfb23efd06b2f8594ef096a Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 2 Sep 2016 16:45:27 +0100 +Subject: [PATCH 133/147] Register the clocks early during the boot process, so + that special/critical clocks can get enabled early on in the boot process + avoiding the risk of disabling a clock, pll_divider or pll when a claiming + driver fails to install propperly - maybe it needs to defer. + +Signed-off-by: Martin Sperl +--- + drivers/clk/bcm/clk-bcm2835.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index fbf616021704178a9d007219a0ea2a9f1704f0a6..cbbc8d4ddcffc797268c0ecb6477005fa14e228b 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1891,8 +1891,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + if (ret) + return ret; + +- return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, +- &cprman->onecell); ++ ret = of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, ++ &cprman->onecell); ++ if (ret) ++ return ret; ++ ++ /* note that we have registered all the clocks */ ++ dev_dbg(dev, "registered %d clocks\n", asize); ++ ++ return 0; + } + + static const struct of_device_id bcm2835_clk_of_match[] = { +@@ -1909,7 +1916,11 @@ static struct platform_driver bcm2835_clk_driver = { + .probe = bcm2835_clk_probe, + }; + +-builtin_platform_driver(bcm2835_clk_driver); ++static int __init __bcm2835_clk_driver_init(void) ++{ ++ return platform_driver_register(&bcm2835_clk_driver); ++} ++core_initcall(__bcm2835_clk_driver_init); + + MODULE_AUTHOR("Eric Anholt "); + MODULE_DESCRIPTION("BCM2835 clock driver"); + +From da8df2aa3e4b115de0ae0575e7c5d7a586719464 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 24 May 2016 17:19:27 +0100 +Subject: [PATCH 134/147] brcmfmac: revise SDIO error message in + brcmf_sdio_drivestrengthinit + +The error message is given for something that is not an error here as +the drive strength configuration may not be applicable for specific +devices. Therefore the error message is rephrased and changed to a +debug message. + +[ Patch from Broadcom ] + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +index ea66454a3d7444f51827964aea01bf7573f2b473..f315428e4f696b4c53af4f5f9cbc30512097af36 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +@@ -3668,7 +3668,7 @@ brcmf_sdio_drivestrengthinit(struct brcmf_sdio_dev *sdiodev, + str_shift = 11; + break; + default: +- brcmf_err("No SDIO Drive strength init done for chip %s rev %d pmurev %d\n", ++ brcmf_dbg(INFO, "No SDIO driver strength init needed for chip %s rev %d pmurev %d\n", + ci->name, ci->chiprev, ci->pmurev); + break; + } + +From 2d0dc10d92394a8c83f32ec21f15635ac903c9ea Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 24 May 2016 17:26:31 +0100 +Subject: [PATCH 135/147] brcmfmac: use ndev->needed_headroom to reserve + additional header space + +When using nmap tool with FMAC, the nmap packets were be dropped by kernel +because the size was too short. The kernel message showed like +"nmap: packet size is too short (42 <= 50)". It is caused by the packet +length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE() +and hard_header_len definition, we should use hard_header_len to reserve L2 +header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for +the additional headroom needed by hardware. + +[ Patch from Broadcom ] + +See: https://github.com/raspberrypi/linux/issues/1357 + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +index b590499f6883294525b094cb66c4449069eb2353..6570dba08bb482bbb3d47ff6f0790a7004b5e547 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +@@ -516,7 +516,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked) + /* set appropriate operations */ + ndev->netdev_ops = &brcmf_netdev_ops_pri; + +- ndev->hard_header_len += drvr->hdrlen; ++ ndev->needed_headroom += drvr->hdrlen; + ndev->ethtool_ops = &brcmf_ethtool_ops; + + drvr->rxsz = ndev->mtu + ndev->hard_header_len + + +From 99d4ec2690f17f47e5fd0dacb93153416d3a38ed Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 6 Jun 2016 11:11:33 +0100 +Subject: [PATCH 136/147] brcmfmac: change rx_seq check log from error print to + debug print + +The bus rx sequence is not in order because that control and event +frames always cause immediate send, but data frames may be held +for glomming in firmware side. It is not actually an error as the +packets are still processed even if the RX sequence is not in order. +Therefore the error message is rephrased and changed to a debug +message. + +[ Patch from Broadcom ] + +See: https://github.com/raspberrypi/linux/issues/1313 +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +index f315428e4f696b4c53af4f5f9cbc30512097af36..8d716401af46cc9ade8daee2d1b6a17c34e8b680 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +@@ -1386,8 +1386,7 @@ static int brcmf_sdio_hdparse(struct brcmf_sdio *bus, u8 *header, + return -ENXIO; + } + if (rd->seq_num != rx_seq) { +- brcmf_err("seq %d: sequence number error, expect %d\n", +- rx_seq, rd->seq_num); ++ brcmf_dbg(SDIO, "seq %d, expected %d\n", rx_seq, rd->seq_num); + bus->sdcnt.rx_badseq++; + rd->seq_num = rx_seq; + } + +From 92e58f330c22adc0a1fa5d9a600879ae9b3c8481 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 19 Aug 2016 11:26:57 +0100 +Subject: [PATCH 137/147] overlays: Add audremap overlay + +The audremap overlay switches the PWM audio outputs to GPIO pins +12 (L) and 13 (R). +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 ++++++ + arch/arm/boot/dts/overlays/audremap-overlay.dts | 14 ++++++++++++++ + 3 files changed, 21 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/audremap-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 68832129f46b9c8320d0d2634c780bdb330314c9..817c3a67fb397c7b6ec5fdeda1cbb3d60855d2d3 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -18,6 +18,7 @@ dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo + dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo + dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += audremap.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dionaudio-loco.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index b32bca8ada3b10aa40a5c718a1823e1fa4f7f5b2..53b2fa926d6e0fe3aead1150bd7a41ef6f0959c0 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -253,6 +253,12 @@ Load: dtoverlay=audioinjector-wm8731-audio + Params: + + ++Name: audremap ++Info: Switches PWM sound output to pins 12 & 13 ++Load: dtoverlay=audremap ++Params: ++ ++ + Name: bmp085_i2c-sensor + Info: Configures the BMP085/BMP180 digital barometric pressure and temperature + sensors from Bosch Sensortec +diff --git a/arch/arm/boot/dts/overlays/audremap-overlay.dts b/arch/arm/boot/dts/overlays/audremap-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..17bbabb712b1c5768f6446bd8cc3b6687ef24cb8 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts +@@ -0,0 +1,14 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&audio_pins>; ++ __overlay__ { ++ brcm,pins = < 12 13 >; ++ brcm,function = < 4 >; /* alt0 alt0 */ ++ }; ++ }; ++}; + +From 8757278b3baaabc3f1c97bdde26272076823dcaf Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 19 Aug 2016 15:39:01 +0100 +Subject: [PATCH 138/147] overlays: Add swap_lr and enable_jack to audremap + +swap_lr causes the channels to be reversed, and enable_jack prevents the +headphone output from being disabled. + +See: https://github.com/raspberrypi/linux/issues/1473 +--- + arch/arm/boot/dts/overlays/README | 9 ++++++--- + arch/arm/boot/dts/overlays/audremap-overlay.dts | 7 ++++++- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 53b2fa926d6e0fe3aead1150bd7a41ef6f0959c0..f1734321e930978c268615d6f6d356237d0c9d3a 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -254,9 +254,12 @@ Params: + + + Name: audremap +-Info: Switches PWM sound output to pins 12 & 13 +-Load: dtoverlay=audremap +-Params: ++Info: Switches PWM sound output to pins 12 (Right) & 13 (Left) ++Load: dtoverlay=audremap,= ++Params: swap_lr Reverse the channel allocation, which will also ++ swap the audio jack outputs (default off) ++ enable_jack Don't switch off the audio jack output ++ (default off) + + + Name: bmp085_i2c-sensor +diff --git a/arch/arm/boot/dts/overlays/audremap-overlay.dts b/arch/arm/boot/dts/overlays/audremap-overlay.dts +index 17bbabb712b1c5768f6446bd8cc3b6687ef24cb8..9582d6ab31218b4ed7b1d42a9190ca6efe9bd531 100644 +--- a/arch/arm/boot/dts/overlays/audremap-overlay.dts ++++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts +@@ -6,9 +6,14 @@ + + fragment@0 { + target = <&audio_pins>; +- __overlay__ { ++ frag0: __overlay__ { + brcm,pins = < 12 13 >; + brcm,function = < 4 >; /* alt0 alt0 */ + }; + }; ++ ++ __overrides__ { ++ swap_lr = <&frag0>, "swap_lr?"; ++ enable_jack = <&frag0>, "enable_jack?"; ++ }; + }; + +From 675ca8a0f919b7e0d1babf202617c8737affa9ca Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 19 Aug 2016 11:12:28 +0100 +Subject: [PATCH 139/147] BCM270X_DT: Add audio_pins to CM dtb + +Bring the CM .dtb in line with other others. +--- + arch/arm/boot/dts/bcm2708-rpi-cm.dts | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts +index d2dcc9c156b32a91a45c26b460fa971abd0dbdf5..ce9f54ff7e4ce76ad25ad0a19cf2ad48ba9df01a 100755 +--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts +@@ -35,6 +35,11 @@ + brcm,pins = <18 19 20 21>; + brcm,function = <4>; /* alt0 */ + }; ++ ++ audio_pins: audio_pins { ++ brcm,pins; ++ brcm,function; ++ }; + }; + + &spi0 { + +From 74717820e2e79a7ae10b38277a00472914e87c02 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 19 Aug 2016 11:19:02 +0100 +Subject: [PATCH 140/147] BCM270X_DT: Don't enable UART0 in CM3 dtb + +--- + arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +index a5d57893d5799e57ffe9b8efe553a03ec4bde007..20388084b98cf942529eb60c55dc540cfea71886 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +@@ -40,12 +40,6 @@ + brcm,function = <4>; /* alt0 */ + }; + +- uart0_pins: uart0_pins { +- brcm,pins; +- brcm,function; +- brcm,pull = <0 2>; +- }; +- + audio_pins: audio_pins { + brcm,pins; + brcm,function; +@@ -75,12 +69,6 @@ + status = "okay"; + }; + +-&uart0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins>; +- status = "okay"; +-}; +- + &spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins &spi0_cs_pins>; + +From 9f28958e2495666619e48b9dd8b290416e503349 Mon Sep 17 00:00:00 2001 +From: wavelet2 +Date: Fri, 19 Aug 2016 09:32:53 +0100 +Subject: [PATCH 141/147] Overlay for Microchip MCP23S08/17 SPI gpio expanders + (#1566) + +Added Overlay for Microchip MCP23S08/17 SPI gpio expanders +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 24 + + arch/arm/boot/dts/overlays/mcp23s17-overlay.dts | 732 ++++++++++++++++++++++++ + 3 files changed, 757 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/mcp23s17-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 817c3a67fb397c7b6ec5fdeda1cbb3d60855d2d3..dc72052757ae5c79d7f196c900d9c0f13ab97a42 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -49,6 +49,7 @@ dtbo-$(RPI_DT_OVERLAYS) += justboom-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += justboom-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp23017.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mcp23s17.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mmc.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index f1734321e930978c268615d6f6d356237d0c9d3a..87042af8550e5d16069a42329e34227a21e4b932 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -631,6 +631,30 @@ Params: gpiopin Gpio pin connected to the INTA output of the + addr I2C address of the MCP23017 (default: 0x20) + + ++Name: mcp23s17 ++Info: Configures the MCP23S08/17 SPI GPIO expanders. ++ If devices are present on SPI1 or SPI2, those interfaces must be enabled ++ with one of the spi1-1/2/3cs and/or spi2-1/2/3cs overlays. ++ If interrupts are enabled for a device on a given CS# on a SPI bus, that ++ device must be the only one present on that SPI bus/CS#. ++Load: dtoverlay=mcp23s17,= ++Params: s08-spi--present 4-bit integer, bitmap indicating MCP23S08 ++ devices present on SPI, CS# ++ ++ s17-spi--present 8-bit integer, bitmap indicating MCP23S17 ++ devices present on SPI, CS# ++ ++ s08-spi--int-gpio integer, enables interrupts on a single ++ MCP23S08 device on SPI, CS#, specifies ++ the GPIO pin to which INT output of MCP23S08 ++ is connected. ++ ++ s17-spi--int-gpio integer, enables mirrored interrupts on a ++ single MCP23S17 device on SPI, CS#, ++ specifies the GPIO pin to which either INTA ++ or INTB output of MCP23S17 is connected. ++ ++ + Name: mcp2515-can0 + Info: Configures the MCP2515 CAN controller on spi0.0 + Load: dtoverlay=mcp2515-can0,= +diff --git a/arch/arm/boot/dts/overlays/mcp23s17-overlay.dts b/arch/arm/boot/dts/overlays/mcp23s17-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..7dcbacb3cd007eb15b2b0f165fd8adc7a7b7c580 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/mcp23s17-overlay.dts +@@ -0,0 +1,732 @@ ++// Overlay for MCP23S08/17 GPIO Extenders from Microchip Semiconductor ++ ++// dtparams: ++// s08-spi--present - 4-bit integer, bitmap indicating MCP23S08 devices present on SPI, CS#. ++// s17-spi--present - 8-bit integer, bitmap indicating MCP23S17 devices present on SPI, CS#. ++// s08-spi--int-gpio - integer, enables interrupts on a single MCP23S08 device on SPI, CS#, specifies the GPIO pin to which INT output is connected. ++// s17-spi--int-gpio - integer, enables mirrored interrupts on a single MCP23S17 device on SPI, CS#, specifies the GPIO pin to which either INTA or INTB output is connected. ++// ++// If devices are present on SPI1 or SPI2, those interfaces must be enabled with one of the spi1-1/2/3cs and/or spi2-1/2/3cs overlays. ++// If interrupts are enabled for a device on a given CS# on a SPI bus, that device must be the only one present on that SPI bus/CS#. ++// ++// Example 1: A single MCP23S17 device on SPI0, CS#0 with its SPI addr set to 0 and INTA output connected to GPIO25: ++// dtoverlay=mcp23s17:s17-spi0-0-present=1,s17-spi0-0-int-gpio=25 ++// ++// Example 2: Two MCP23S08 devices on SPI1, CS#0 with their addrs set to 2 and 3. Three MCP23S17 devices on SPI1, CS#1 with their addrs set to 0, 1 and 7: ++// dtoverlay=spi1-2cs ++// dtoverlay=mcp23s17:s08-spi1-0-present=12,s17-spi1-1-present=131 ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ // disable spi-dev on spi0.0 ++ fragment@0 { ++ target = <&spidev0>; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi0.1 ++ fragment@1 { ++ target = <&spidev1>; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi1.0 ++ fragment@2 { ++ target-path = "spi1/spidev@0"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi1.1 ++ fragment@3 { ++ target-path = "spi1/spidev@1"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi1.2 ++ fragment@4 { ++ target-path = "spi1/spidev@2"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi2.0 ++ fragment@5 { ++ target-path = "spi2/spidev@0"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi2.1 ++ fragment@6 { ++ target-path = "spi2/spidev@1"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi2.2 ++ fragment@7 { ++ target-path = "spi2/spidev@2"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi0.0 ++ fragment@8 { ++ target = <&spi0>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_00: mcp23s08@0 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi0-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi0-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi0.1 ++ fragment@9 { ++ target = <&spi0>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_01: mcp23s08@1 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi0-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi0-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi1.0 ++ fragment@10 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_10: mcp23s08@0 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi1-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi1-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi1.1 ++ fragment@11 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_11: mcp23s08@1 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi1-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi1-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi1.2 ++ fragment@12 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_12: mcp23s08@2 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi1-2-present parameter */ ++ reg = <2>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi1-2-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi2.0 ++ fragment@13 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_20: mcp23s08@0 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi2-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi2-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi2.1 ++ fragment@14 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_21: mcp23s08@1 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi2-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi2-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi2.2 ++ fragment@15 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_22: mcp23s08@2 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi2-2-present parameter */ ++ reg = <2>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi2-2-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi0.0 ++ fragment@16 { ++ target = <&spi0>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_00: mcp23s17@0 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi0-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi0-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi0.1 ++ fragment@17 { ++ target = <&spi0>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_01: mcp23s17@1 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi0-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi0-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi1.0 ++ fragment@18 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_10: mcp23s17@0 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi1-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi1-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi1.1 ++ fragment@19 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_11: mcp23s17@1 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi1-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi1-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi1.2 ++ fragment@20 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_12: mcp23s17@2 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi1-2-present parameter */ ++ reg = <2>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi1-2-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi2.0 ++ fragment@21 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_20: mcp23s17@0 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi2-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi2-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi2.1 ++ fragment@22 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_21: mcp23s17@1 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi2-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi2-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi2.2 ++ fragment@23 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_22: mcp23s17@2 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi2-2-present parameter */ ++ reg = <2>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi2-2-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi0.0 as a input with no pull-up/down ++ fragment@24 { ++ target = <&gpio>; ++ __dormant__ { ++ spi0_0_int_pins: spi0_0_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi0-0-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi0.1 as a input with no pull-up/down ++ fragment@25 { ++ target = <&gpio>; ++ __dormant__ { ++ spi0_1_int_pins: spi0_1_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi0-1-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi1.0 as a input with no pull-up/down ++ fragment@26 { ++ target = <&gpio>; ++ __dormant__ { ++ spi1_0_int_pins: spi1_0_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi1-0-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi1.1 as a input with no pull-up/down ++ fragment@27 { ++ target = <&gpio>; ++ __dormant__ { ++ spi1_1_int_pins: spi1_1_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi1-1-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi1.2 as a input with no pull-up/down ++ fragment@28 { ++ target = <&gpio>; ++ __dormant__ { ++ spi1_2_int_pins: spi1_2_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi1-2-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi2.0 as a input with no pull-up/down ++ fragment@29 { ++ target = <&gpio>; ++ __dormant__ { ++ spi2_0_int_pins: spi2_0_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi2-0-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi2.1 as a input with no pull-up/down ++ fragment@30 { ++ target = <&gpio>; ++ __dormant__ { ++ spi2_1_int_pins: spi2_1_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi2-1-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi2.2 as a input with no pull-up/down ++ fragment@31 { ++ target = <&gpio>; ++ __dormant__ { ++ spi2_2_int_pins: spi2_2_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi2-2-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi0.0. ++ // Use default active low interrupt signalling. ++ fragment@32 { ++ target = <&mcp23s08_00>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi0.1. ++ // Use default active low interrupt signalling. ++ fragment@33 { ++ target = <&mcp23s08_01>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi1.0. ++ // Use default active low interrupt signalling. ++ fragment@34 { ++ target = <&mcp23s08_10>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi1.1. ++ // Use default active low interrupt signalling. ++ fragment@35 { ++ target = <&mcp23s08_11>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi1.2. ++ // Use default active low interrupt signalling. ++ fragment@36 { ++ target = <&mcp23s08_12>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi2.0. ++ // Use default active low interrupt signalling. ++ fragment@37 { ++ target = <&mcp23s08_20>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi2.1. ++ // Use default active low interrupt signalling. ++ fragment@38 { ++ target = <&mcp23s08_21>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi2.2. ++ // Use default active low interrupt signalling. ++ fragment@39 { ++ target = <&mcp23s08_22>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi0.0. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Use default active low interrupt signalling. ++ fragment@40 { ++ target = <&mcp23s17_00>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi0.1. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@41 { ++ target = <&mcp23s17_01>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi1.0. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@42 { ++ target = <&mcp23s17_10>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi1.1. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@43 { ++ target = <&mcp23s17_11>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi1.2. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@44 { ++ target = <&mcp23s17_12>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi2.0. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@45 { ++ target = <&mcp23s17_20>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi2.1. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@46 { ++ target = <&mcp23s17_21>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi2.2. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@47 { ++ target = <&mcp23s17_22>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ __overrides__ { ++ s08-spi0-0-present = <0>,"+0+8", <&mcp23s08_00>,"microchip,spi-present-mask:0"; ++ s08-spi0-1-present = <0>,"+1+9", <&mcp23s08_01>,"microchip,spi-present-mask:0"; ++ s08-spi1-0-present = <0>,"+2+10", <&mcp23s08_10>,"microchip,spi-present-mask:0"; ++ s08-spi1-1-present = <0>,"+3+11", <&mcp23s08_11>,"microchip,spi-present-mask:0"; ++ s08-spi1-2-present = <0>,"+4+12", <&mcp23s08_12>,"microchip,spi-present-mask:0"; ++ s08-spi2-0-present = <0>,"+5+13", <&mcp23s08_20>,"microchip,spi-present-mask:0"; ++ s08-spi2-1-present = <0>,"+6+14", <&mcp23s08_21>,"microchip,spi-present-mask:0"; ++ s08-spi2-2-present = <0>,"+7+15", <&mcp23s08_22>,"microchip,spi-present-mask:0"; ++ s17-spi0-0-present = <0>,"+0+16", <&mcp23s17_00>,"microchip,spi-present-mask:0"; ++ s17-spi0-1-present = <0>,"+1+17", <&mcp23s17_01>,"microchip,spi-present-mask:0"; ++ s17-spi1-0-present = <0>,"+2+18", <&mcp23s17_10>,"microchip,spi-present-mask:0"; ++ s17-spi1-1-present = <0>,"+3+19", <&mcp23s17_11>,"microchip,spi-present-mask:0"; ++ s17-spi1-2-present = <0>,"+4+20", <&mcp23s17_12>,"microchip,spi-present-mask:0"; ++ s17-spi2-0-present = <0>,"+5+21", <&mcp23s17_20>,"microchip,spi-present-mask:0"; ++ s17-spi2-1-present = <0>,"+6+22", <&mcp23s17_21>,"microchip,spi-present-mask:0"; ++ s17-spi2-2-present = <0>,"+7+23", <&mcp23s17_22>,"microchip,spi-present-mask:0"; ++ s08-spi0-0-int-gpio = <0>,"+24+32", <&spi0_0_int_pins>,"brcm,pins:0", <&mcp23s08_00>,"interrupts:0"; ++ s08-spi0-1-int-gpio = <0>,"+25+33", <&spi0_1_int_pins>,"brcm,pins:0", <&mcp23s08_01>,"interrupts:0"; ++ s08-spi1-0-int-gpio = <0>,"+26+34", <&spi1_0_int_pins>,"brcm,pins:0", <&mcp23s08_10>,"interrupts:0"; ++ s08-spi1-1-int-gpio = <0>,"+27+35", <&spi1_1_int_pins>,"brcm,pins:0", <&mcp23s08_11>,"interrupts:0"; ++ s08-spi1-2-int-gpio = <0>,"+28+36", <&spi1_2_int_pins>,"brcm,pins:0", <&mcp23s08_12>,"interrupts:0"; ++ s08-spi2-0-int-gpio = <0>,"+29+37", <&spi2_0_int_pins>,"brcm,pins:0", <&mcp23s08_20>,"interrupts:0"; ++ s08-spi2-1-int-gpio = <0>,"+30+38", <&spi2_1_int_pins>,"brcm,pins:0", <&mcp23s08_21>,"interrupts:0"; ++ s08-spi2-2-int-gpio = <0>,"+31+39", <&spi2_2_int_pins>,"brcm,pins:0", <&mcp23s08_22>,"interrupts:0"; ++ s17-spi0-0-int-gpio = <0>,"+24+40", <&spi0_0_int_pins>,"brcm,pins:0", <&mcp23s17_00>,"interrupts:0"; ++ s17-spi0-1-int-gpio = <0>,"+25+41", <&spi0_1_int_pins>,"brcm,pins:0", <&mcp23s17_01>,"interrupts:0"; ++ s17-spi1-0-int-gpio = <0>,"+26+42", <&spi1_0_int_pins>,"brcm,pins:0", <&mcp23s17_10>,"interrupts:0"; ++ s17-spi1-1-int-gpio = <0>,"+27+43", <&spi1_1_int_pins>,"brcm,pins:0", <&mcp23s17_11>,"interrupts:0"; ++ s17-spi1-2-int-gpio = <0>,"+28+44", <&spi1_2_int_pins>,"brcm,pins:0", <&mcp23s17_12>,"interrupts:0"; ++ s17-spi2-0-int-gpio = <0>,"+29+45", <&spi2_0_int_pins>,"brcm,pins:0", <&mcp23s17_20>,"interrupts:0"; ++ s17-spi2-1-int-gpio = <0>,"+30+46", <&spi2_1_int_pins>,"brcm,pins:0", <&mcp23s17_21>,"interrupts:0"; ++ s17-spi2-2-int-gpio = <0>,"+31+47", <&spi2_2_int_pins>,"brcm,pins:0", <&mcp23s17_22>,"interrupts:0"; ++ }; ++}; ++ + +From 255e9be2c624acf3995e9e0787b9c513e0dea077 Mon Sep 17 00:00:00 2001 +From: Georgii Staroselskii +Date: Tue, 23 Aug 2016 17:40:05 +0400 +Subject: [PATCH 142/147] overlays: added sc16is750 UART over I2C (#1617) + +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 10 ++++++ + .../boot/dts/overlays/sc16is750-i2c-overlay.dts | 37 ++++++++++++++++++++++ + 3 files changed, 48 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index dc72052757ae5c79d7f196c900d9c0f13ab97a42..35a1673379d4fb9aa4c1028310a44b79e23ac2ce 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -74,6 +74,7 @@ dtbo-$(RPI_DT_OVERLAYS) += rpi-ft5406.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rra-digidac1-wm8741-audio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sc16is750-i2c.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sc16is752-spi1.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 87042af8550e5d16069a42329e34227a21e4b932..f93b8ffd40157da92685095f75ea67943153a16b 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -927,6 +927,16 @@ Load: dtoverlay=rra-digidac1-wm8741-audio + Params: + + ++Name: sc16is750-i2c ++Info: Overlay for the NXP SC16IS750 UART with I2C Interface ++ Enables the chip on I2C1 at 0x48. To select another address, ++ please refer to table 10 in reference manual. ++ ++Load: dtoverlay=sc16is750-i2c,= ++Params: int_pin GPIO used for IRQ (default 24) ++ addr Address (default 0x48) ++ ++ + Name: sc16is752-spi1 + Info: Overlay for the NXP SC16IS752 Dual UART with SPI Interface + Enables the chip on SPI1. +diff --git a/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts b/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..339d0d17c01ff182edd0871de9dc4ea744917ad4 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts +@@ -0,0 +1,37 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&i2c_arm>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ sc16is750: sc16is750@48 { ++ compatible = "nxp,sc16is750"; ++ reg = <0x48>; /* address */ ++ clocks = <&sc16is750_clk>; ++ interrupt-parent = <&gpio>; ++ interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */ ++ #gpio-cells = <2>; ++ ++ sc16is750_clk: sc16is750_clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <14745600>; ++ }; ++ }; ++ }; ++ }; ++ ++ ++ __overrides__ { ++ int_pin = <&sc16is750>,"interrupts:0"; ++ addr = <&sc16is750>,"reg:0"; ++ }; ++ ++}; + +From c8280f68f1d0c8184eab0631ab363c6fce0a2ea3 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 22 Aug 2016 11:56:04 +0100 +Subject: [PATCH 143/147] overlays: Clarify gpio-poweroff semantics in README + +1) GPIO pin is signalled on poweroff, not reboot. +2) In RPi kernels, halt is equivalent to poweroff. + +See: https://github.com/raspberrypi/linux/issues/1600 +--- + arch/arm/boot/dts/overlays/README | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index f93b8ffd40157da92685095f75ea67943153a16b..7a98f105eb94b95f0f592cad5dd20dd63342dd38 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -340,7 +340,7 @@ Params: gpio_pin Input pin number. Default is 18. + + + Name: gpio-poweroff +-Info: Drives a GPIO high or low on reboot ++Info: Drives a GPIO high or low on poweroff (including halt) + Load: dtoverlay=gpio-poweroff,= + Params: gpiopin GPIO for signalling (default 26) + + +From 4ca5aaf0a2bf4e25d2dfa30eb67691f20637083d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 9 Aug 2016 21:51:41 +0100 +Subject: [PATCH 144/147] overlays: Add assert_falling_edge to pps-gpio overlay + +See: https://github.com/raspberrypi/linux/issues/1590 +--- + arch/arm/boot/dts/overlays/README | 2 ++ + arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 7a98f105eb94b95f0f592cad5dd20dd63342dd38..37f00748a0a240e25c06e621915683f88962d3be 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -824,6 +824,8 @@ Name: pps-gpio + Info: Configures the pps-gpio (pulse-per-second time signal via GPIO). + Load: dtoverlay=pps-gpio,= + Params: gpiopin Input GPIO (default "18") ++ assert_falling_edge When present, assert is indicated by a falling ++ edge, rather than by a rising edge + + + Name: pwm +diff --git a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts +index 40bf0e11015f5abebd0d4139276da888d728d569..50143a4bb215807ba0a0d0562f5827fa29a04de4 100644 +--- a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts +@@ -30,5 +30,6 @@ + __overrides__ { + gpiopin = <&pps>,"gpios:4", + <&pps_pins>,"brcm,pins:0"; ++ assert_falling_edge = <&pps>,"assert-falling-edge?"; + }; + }; + +From ae63d37e4f183fbcf4bffa7bf126e8f0eb174c52 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 2 Sep 2016 17:21:42 +0100 +Subject: [PATCH 145/147] bcm2835-sdhost: Don't exit cmd wait loop on error + +The FAIL flag can be set in the CMD register before command processing +is complete, leading to spurious "failed to complete" errors. This has +the effect of promoting harmless CRC7 errors during CMD1 processing +into errors that can delay and even prevent booting. + +Also: +1) Convert the last KERN_ERROR message in the register dumping to + KERN_INFO. +2) Remove an unnecessary reset call from bcm2835_sdhost_add_host. + +See: https://github.com/raspberrypi/linux/pull/1492 + +Signed-off-by: Phil Elwell +--- + drivers/mmc/host/bcm2835-sdhost.c | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c +index d7b6b5a4e31f7aaa76470d3a79ea78a643184855..22bfb340011b0c857f8eb4824eb0b656def6a006 100644 +--- a/drivers/mmc/host/bcm2835-sdhost.c ++++ b/drivers/mmc/host/bcm2835-sdhost.c +@@ -373,7 +373,7 @@ static void bcm2835_sdhost_dumpregs(struct bcm2835_host *host) + pr_info("%s: SDRSP2 0x%08x\n", + mmc_hostname(host->mmc), + bcm2835_sdhost_read(host, SDRSP2)); +- pr_err("%s: SDRSP3 0x%08x\n", ++ pr_info("%s: SDRSP3 0x%08x\n", + mmc_hostname(host->mmc), + bcm2835_sdhost_read(host, SDRSP3)); + pr_info("%s: SDHSTS 0x%08x\n", +@@ -1183,9 +1183,8 @@ static void bcm2835_sdhost_finish_command(struct bcm2835_host *host, + retries = 1; // We've already waited long enough this time + } + +- retries = host->cmd_quick_poll_retries; + for (sdcmd = bcm2835_sdhost_read(host, SDCMD); +- (sdcmd & SDCMD_NEW_FLAG) && !(sdcmd & SDCMD_FAIL_FLAG) && retries; ++ (sdcmd & SDCMD_NEW_FLAG) && retries; + retries--) { + cpu_relax(); + sdcmd = bcm2835_sdhost_read(host, SDCMD); +@@ -1208,8 +1207,7 @@ static void bcm2835_sdhost_finish_command(struct bcm2835_host *host, + usleep_range(1, 10); + spin_lock_irqsave(&host->lock, *irq_flags); + sdcmd = bcm2835_sdhost_read(host, SDCMD); +- if (!(sdcmd & SDCMD_NEW_FLAG) || +- (sdcmd & SDCMD_FAIL_FLAG)) ++ if (!(sdcmd & SDCMD_NEW_FLAG)) + break; + } + } +@@ -1892,8 +1890,6 @@ int bcm2835_sdhost_add_host(struct bcm2835_host *host) + + mmc = host->mmc; + +- bcm2835_sdhost_reset_internal(host); +- + mmc->f_max = host->max_clk; + mmc->f_min = host->max_clk / SDCDIV_MAX_CDIV; + + +From 9a3438b31ee12f2574fd79e71fd084156c63823d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 2 Sep 2016 14:35:37 +0100 +Subject: [PATCH 146/147] BCM270X_DT: Use bcm2835-sdhost on Compute Module + +With the preceding commit: + + bcm2835-sdhost: Don't exit cmd wait loop on error + +it is safe to use the bcm2835-sdhost driver on the Compute Module. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +index f07609d97225b355dd2b6981d4f1fa28d0d40950..d33d462b4090e4a4f967a37212918b9cf500bf76 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi ++++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +@@ -23,9 +23,9 @@ + }; + + +-&mmc { ++&sdhost { + pinctrl-names = "default"; +- pinctrl-0 = <&mmc_pins>; ++ pinctrl-0 = <&sdhost_pins>; + non-removable; + bus-width = <4>; + status = "okay"; + +From 8bd69b6769d77445005957ac91df80c98066f501 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 7 Sep 2016 16:57:59 +0100 +Subject: [PATCH 147/147] fbmem: Ensure that parameters are properly checked + within fb_copyarea_user + +--- + drivers/video/fbdev/core/fbmem.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c +index 1d3b35ec8e393aac43dca0ec4566f7a7d0d8998a..7bf48e478c056fcd745026902961506d5826615d 100644 +--- a/drivers/video/fbdev/core/fbmem.c ++++ b/drivers/video/fbdev/core/fbmem.c +@@ -1090,7 +1090,13 @@ static int fb_copyarea_user(struct fb_info *info, + int ret = 0; + if (!lock_fb_info(info)) + return -ENODEV; +- if (copy->dx + copy->width > info->var.xres || ++ if (copy->dx >= info->var.xres || ++ copy->sx >= info->var.xres || ++ copy->width > info->var.xres || ++ copy->dy >= info->var.yres || ++ copy->sy >= info->var.yres || ++ copy->height > info->var.yres || ++ copy->dx + copy->width > info->var.xres || + copy->sx + copy->width > info->var.xres || + copy->dy + copy->height > info->var.yres || + copy->sy + copy->height > info->var.yres) { diff --git a/projects/RPi2/patches/linux/linux-01-RPi_support.patch b/projects/RPi2/patches/linux/linux-01-RPi_support.patch index 97146135f0..bf3e6409b6 100644 --- a/projects/RPi2/patches/linux/linux-01-RPi_support.patch +++ b/projects/RPi2/patches/linux/linux-01-RPi_support.patch @@ -1,7 +1,7 @@ -From b3a991b03f20c70e2a9b9578596a5d3d74e2ed7c Mon Sep 17 00:00:00 2001 +From c5b275dbc5ea9daa14e9e5d2b81415998fdf5533 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 27 Apr 2016 17:43:28 +0100 -Subject: [PATCH 001/119] Revert "SUNRPC: Make NFS swap work with multipath" +Subject: [PATCH 001/147] Revert "SUNRPC: Make NFS swap work with multipath" This reverts commit 15001e5a7e1e207b6bd258cd8f187814cd15b6dc. --- @@ -95,10 +95,10 @@ index 2808d550d2730ff8e36b6d8c072c65e1631064c4..b362c2f099941c1f3388507983ffbdd1 EXPORT_SYMBOL_GPL(rpc_clnt_swap_deactivate); #endif /* CONFIG_SUNRPC_SWAP */ -From cef4817e002053fa71beaa23ee75a03b1084e217 Mon Sep 17 00:00:00 2001 +From 6ef1f7bd7fa3f37e30494c38020c51957b97dd2a Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 002/119] smsx95xx: fix crimes against truesize +Subject: [PATCH 002/147] smsx95xx: fix crimes against truesize smsc95xx is adjusting truesize when it shouldn't, and following a recent patch from Eric this is now triggering warnings. @@ -145,10 +145,10 @@ index dc989a8b5afbd62b07cd65a2fa5edde67d3cc5fb..116680e3089f16e1e3e9113a3b93e62c usbnet_skb_return(dev, ax_skb); } -From 037225865f0c5833f249ea1217347d0399741441 Mon Sep 17 00:00:00 2001 +From 6e4626e71005fdbe48baa63f0b7a4ba40d19867a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 Apr 2015 16:58:45 +0100 -Subject: [PATCH 003/119] smsc95xx: Disable turbo mode by default +Subject: [PATCH 003/147] smsc95xx: Disable turbo mode by default --- drivers/net/usb/smsc95xx.c | 2 +- @@ -168,10 +168,10 @@ index 116680e3089f16e1e3e9113a3b93e62cb78cc1bb..aa4cb43dcd9ba83b042332bc15a4dce6 MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); -From 091c8b1d376a7fd69788110b6069b65599e7e323 Mon Sep 17 00:00:00 2001 +From d9b4b7b9cd167e8d538ee82bb316e4b427f5ebc4 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 004/119] add smsc95xx packetsize module_param +Subject: [PATCH 004/147] add smsc95xx packetsize module_param Signed-off-by: Sam Nazarko --- @@ -213,10 +213,10 @@ index aa4cb43dcd9ba83b042332bc15a4dce68affce28..889bdabd9dea6cebccc361aa4ac569d7 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From d0308a38ad9fb4fad9ed78c4df262b6359a65e81 Mon Sep 17 00:00:00 2001 +From 492e0a8c445eae74eda7a362c6eb141a98f1c7c6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 005/119] Allow mac address to be set in smsc95xx +Subject: [PATCH 005/147] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -312,10 +312,10 @@ index 889bdabd9dea6cebccc361aa4ac569d73681396b..d22a2324085fbf61fbd8920362bfc7b9 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From 241f4bafbfc3fcddb427fde34b4cc3186f0007cf Mon Sep 17 00:00:00 2001 +From 0d583a7af5886b9dabc7a4b88b64d19d6617f332 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 13:28:24 +0000 -Subject: [PATCH 006/119] serial: Take care starting a hung-up tty's port +Subject: [PATCH 006/147] serial: Take care starting a hung-up tty's port tty_port_hangup sets a port's tty field to NULL (holding the port lock), but uart_tx_stopped, called from __uart_start (with the port lock), @@ -343,10 +343,10 @@ index a3d7c0d4a03e75016023184a5fea18c91d9d8dbc..d61b4167a03205f917448d0bd71a84d0 return 0; } -From 196a0d2433fd13ec9295838d8ad95f42b534f8d5 Mon Sep 17 00:00:00 2001 +From 388620ba598719c3a9627d497f478dc586900c49 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Jun 2014 13:42:01 +0100 -Subject: [PATCH 007/119] vmstat: Workaround for issue where dirty page count +Subject: [PATCH 007/147] vmstat: Workaround for issue where dirty page count goes negative See: @@ -373,10 +373,10 @@ index d2da8e053210041bfcefb9e04b59d195880d2d0e..e3258dc35371ee6e528dc02ffc705570 static inline void __inc_zone_page_state(struct page *page, -From 185e4131131c921380bae165eebe91e61970d964 Mon Sep 17 00:00:00 2001 +From 0d747acc93309f54dec5a8189cd33ca4674f88ac Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 008/119] Protect __release_resource against resources without +Subject: [PATCH 008/147] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -404,10 +404,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From 77af8947810ce49be1483f4bfd1d2896bbb4bdf1 Mon Sep 17 00:00:00 2001 +From aa0b84f496a481c5e7922684ec52514a523af0ab Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 009/119] mm: Remove the PFN busy warning +Subject: [PATCH 009/147] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -432,10 +432,10 @@ index 8b3e1341b7544608cac4777a37bbd424432488e1..9dba743762508ea1cced150388afa38f goto done; } -From b2a790401ac6156038c376d4258b15f91c5f562e Mon Sep 17 00:00:00 2001 +From 251cf429c655dbd52d4f02c78f64dae50295b4ad Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 010/119] BCM2835_DT: Fix I2S register map +Subject: [PATCH 010/147] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -473,10 +473,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 5ba4658f4f37ab946cb7ef37508e49f210e1c8c2 Mon Sep 17 00:00:00 2001 +From 6cc03c1a6e001b98272b6be79c75ca7ee67b6560 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 011/119] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 011/147] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -503,10 +503,10 @@ index 72ff1d5c5de67058f4ef22bb233c41b7c737d6e3..de3b3a37a63d00cc82ae4725b2fe8584 #endif } else if (stat) { -From 8e1f6bd19cbcdcdfc1281586503de7edfc6e4a8e Mon Sep 17 00:00:00 2001 +From 2c2163f38510dfc6a2a58c6fd51fb1eaa0e28602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 12 Jun 2015 19:01:05 +0200 -Subject: [PATCH 012/119] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 012/147] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -635,10 +635,10 @@ index bf9cc5f2e839e845fe1ce65caa672b6212d3ffbc..3f601f98aa884b941fbb84edb349f6c4 } -From 320832a9ca9f41c77fd7c11ae87be6e03211b416 Mon Sep 17 00:00:00 2001 +From 62ea944d60c8b5c44088d3d23284e145bea0f6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 23 Oct 2015 16:26:55 +0200 -Subject: [PATCH 013/119] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 013/147] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -734,10 +734,10 @@ index 3f601f98aa884b941fbb84edb349f6c469b940b1..20deb282286834b1f234a65e614b8584 for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 8776ee14f1397ae851a8c86bbadb08494323a13d Mon Sep 17 00:00:00 2001 +From 2ae4221d78eb8d7b0dcd20839968ac4c34cc4d87 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 014/119] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 014/147] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -758,10 +758,10 @@ index e3c19f30f591115a823467033702ff1b232c5ebc..f4963e3c1dbcd13edb9b97e9dad65438 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From 82b90b0b4a357f44e02b57656c2acf678ac69f14 Mon Sep 17 00:00:00 2001 +From 26e4aa2cfba15991fa9d31f205a48aeeb58cc9be Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 30 Jun 2015 14:12:42 +0100 -Subject: [PATCH 015/119] serial: 8250: Don't crash when nr_uarts is 0 +Subject: [PATCH 015/147] serial: 8250: Don't crash when nr_uarts is 0 --- drivers/tty/serial/8250/8250_core.c | 2 ++ @@ -781,10 +781,10 @@ index 0fbd7c033a251e7d0cb214ed2bbd1ad1f19f0a76..00fc96497968c826978465957454ad73 for (i = 0; i < nr_uarts; i++) { struct uart_8250_port *up = &serial8250_ports[i]; -From 7eaaa312509254cd8e57c45688c97e8abf8f4e67 Mon Sep 17 00:00:00 2001 +From ce4ae437749dfd05c45c63a38097dd8fa704e5eb Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 016/119] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 016/147] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -806,10 +806,10 @@ index fa77165fab2c1348163979da507df17e7168c49b..d11e2e4ea189466e686d762cb6c6fef9 .can_sleep = false, }; -From c501d4dc7b5902d3ce5aa7fbd84a945700687283 Mon Sep 17 00:00:00 2001 +From de7c08cfe41c44e56c511c96045e667008bbc40a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 017/119] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 017/147] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -955,10 +955,10 @@ index d11e2e4ea189466e686d762cb6c6fef9111ecf8e..107ad7d58de8f8a7f55e09c9cdcf7d66 }, }; -From 46f13e55afadcc5d65377293cb0980e6644bf1a7 Mon Sep 17 00:00:00 2001 +From 947df7e8d1d221c15778c05dcf5fce8f67aa125d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 018/119] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 018/147] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -985,10 +985,10 @@ index 107ad7d58de8f8a7f55e09c9cdcf7d66fa7ab66b..644bdecbcfcb79d3b84a33769265fca5 pc->irq_data[i].irqgroup = i; -From ca462b28f55c3f42de0f025760c49aae7379c4f7 Mon Sep 17 00:00:00 2001 +From 1a86637679bcf40a2ebc7c69608b8a0849887545 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 May 2016 12:32:47 +0100 -Subject: [PATCH 019/119] pinctrl-bcm2835: Return pins to inputs when freed +Subject: [PATCH 019/147] pinctrl-bcm2835: Return pins to inputs when freed When dynamically unloading overlays, it is important that freed pins are restored to being inputs to prevent functions from being enabled in @@ -1029,10 +1029,10 @@ index 644bdecbcfcb79d3b84a33769265fca5d3d0c9e5..81a66cba2ab0f7e3ae179de7edd10122 .get_function_name = bcm2835_pmx_get_function_name, .get_function_groups = bcm2835_pmx_get_function_groups, -From d7a6f46b6efdb24d9e13bf53c4101f784fb0d000 Mon Sep 17 00:00:00 2001 +From 15cc2cbfb59418b574e29441dec58cddc650a1ae Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 020/119] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 020/147] spi-bcm2835: Support pin groups other than 7-11 The spi-bcm2835 driver automatically uses GPIO chip-selects due to some unreliability of the native ones. In doing so it chooses the @@ -1113,10 +1113,10 @@ index f35cc10772f6670397ea923ad30158270dd68578..5dfe20ffc2866fa6789825016c585175 /* and set up the "mode" and level */ dev_info(&spi->dev, "setting up native-CS%i as GPIO %i\n", -From 31c6e8f53d830408409252a79578a15e482feea3 Mon Sep 17 00:00:00 2001 +From 2fa140d8eec85123d4b53ad5ecd8c315b5bcc713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Wed, 3 Jun 2015 12:26:13 +0200 -Subject: [PATCH 021/119] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 021/147] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1174,10 +1174,10 @@ index 834d67684e205a185971c13ebc6620434eeac788..3b68a8d3501a5dcb1b4790c35d921cf5 static const char * const bcm2835_compat[] = { -From f12d50eb750065f06af1aff912190fea17628367 Mon Sep 17 00:00:00 2001 +From a7212a79653c182e84b7b26293c8a209eb4b0427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 3 Oct 2015 22:22:55 +0200 -Subject: [PATCH 022/119] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 022/147] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1280,10 +1280,10 @@ index 6149b27c33ad0962a19ed411055d9d05bfb252d3..43265b2847d37b3ee8f71b7528eebea1 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From d902933fe3953262146692161168dd3d182da06d Mon Sep 17 00:00:00 2001 +From 5b9c8fdcaa898f1d86600b99fbbaeabb60aa9c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Sat, 15 Aug 2015 20:50:02 +0200 -Subject: [PATCH 023/119] bcm2835: Add support for uart1 +Subject: [PATCH 023/147] bcm2835: Add support for uart1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1340,10 +1340,10 @@ index 3b68a8d3501a5dcb1b4790c35d921cf5fa641ec7..e72e522fbc840c36a39cb6550850b3c6 static const char * const bcm2835_compat[] = { -From f87575697a12af31a6cdeb7346a4f34ced919311 Mon Sep 17 00:00:00 2001 +From 6df3c386d76162d98a99e13fd2cd16875b7d20c3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 024/119] firmware: Updated mailbox header +Subject: [PATCH 024/147] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 11 +++++++++++ @@ -1406,10 +1406,10 @@ index 3fb357193f09914fe21f8555a4b8613f74f22bc3..227a107214a02deadcca3db202da265e RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001, RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, -From 830082c887e90076ea528cdb206798e8bbfd866e Mon Sep 17 00:00:00 2001 +From 5a8600595cf8501ad8fb869a25cb2780b0a08ceb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 025/119] Main bcm2708/bcm2709 linux port +Subject: [PATCH 025/147] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -3919,10 +3919,10 @@ index 45cde8cd39f2434f5f9ec02c702a91a7f6b971c9..6a01ffa629386bdecf85e5a4736f7c27 mmc_pm_flag_t pm_caps; /* supported pm features */ -From 20230801c659dbaa835fcc5871b7f7a76743cc5e Mon Sep 17 00:00:00 2001 +From 998d313533d3147db5876f4f6efc9d45568ff7bd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 026/119] reboot: Use power off rather than busy spinning when +Subject: [PATCH 026/147] reboot: Use power off rather than busy spinning when halt is requested --- @@ -3945,10 +3945,10 @@ index 3fa867a2aae672755c6ce6448f4148c989dbf964..80dca8dcd6709034b643c6a3f35729e0 /* -From 1dfdeeaa718e08b61647d39d7cf73c8878ad8aea Mon Sep 17 00:00:00 2001 +From 884bad61e2b8c1c2620d5d0120d60bb087252898 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 11 Nov 2015 21:01:15 +0000 -Subject: [PATCH 027/119] squash: include ARCH_BCM2708 / ARCH_BCM2709 +Subject: [PATCH 027/147] squash: include ARCH_BCM2708 / ARCH_BCM2709 --- drivers/char/hw_random/Kconfig | 2 +- @@ -4125,10 +4125,10 @@ index 6a834e109f1de47e533d17e87cdc73d8ee86fc4d..c5070aec5996aafb2d9daaf75163e16a select REGMAP_MMIO help -From 71e43c8655cf530d29be6ac1158d1c89053aa53e Mon Sep 17 00:00:00 2001 +From 97adebf65f3147df5b9e86bcea2f0a2e15e6aae5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 028/119] Add dwc_otg driver +Subject: [PATCH 028/147] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -4822,10 +4822,10 @@ index 358ca8dd784fe43700ae070764fa783500a792fe..abaac7c7142d8887c1516957fc52162c return i; } diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index bee13517676f9b2f00e3cd4e3fd4185f5aaa13c9..844ed26f2743b921e5a81cca1654badde94e05cd 100644 +index 1d5fc32d06d007a6f64526a531da8ae69e8e6950..ce881480114d0f444f4b1099c713c2568b725162 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5046,7 +5046,7 @@ static void port_event(struct usb_hub *hub, int port1) +@@ -5041,7 +5041,7 @@ static void port_event(struct usb_hub *hub, int port1) if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; @@ -65154,10 +65154,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 1f1b5fbbeb7d47cb559829ce2ecc64dea3cadc40 Mon Sep 17 00:00:00 2001 +From 2afe97d206afc8a4739a446221cfbee56ff709c4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 029/119] bcm2708 framebuffer driver +Subject: [PATCH 029/147] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -68616,10 +68616,10 @@ index 3c14e43b82fefe1d32f591d1b2f61d2cd28d0fa8..7626beb6a5bb8df601ddf0f6e6909d1f +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 -From e3a46851101da511663fb8c1e9ace64400fb1c5a Mon Sep 17 00:00:00 2001 +From fb9cf85c8674d0353082355eb1e9dc4d724e2c3e Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 030/119] dmaengine: Add support for BCM2708 +Subject: [PATCH 030/147] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69239,10 +69239,10 @@ index 0000000000000000000000000000000000000000..99cc7fdbf543207208bf3638a0d4dbb6 + +#endif /* _PLAT_BCM2708_DMA_H */ -From 2eb0c07a4c0a2b5a3dcb47e8b2e2771faac17a11 Mon Sep 17 00:00:00 2001 +From f701bc08b01f46bfa6320fb597ae02dbee95ba3a Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 031/119] MMC: added alternative MMC driver +Subject: [PATCH 031/147] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -70989,10 +70989,10 @@ index 0000000000000000000000000000000000000000..ceb37930e167f47c9c848e8de757ad09 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From d03a7264ec92e4f59ff25dbb70fe755969411f51 Mon Sep 17 00:00:00 2001 +From 5bff3b6e188d8f84177f98ca3b835261c151df24 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 032/119] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 032/147] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -73372,10 +73372,10 @@ index 0000000000000000000000000000000000000000..d7b6b5a4e31f7aaa76470d3a79ea78a6 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From c7c7f6442e1a041ff0449fd00716fae3681d6790 Mon Sep 17 00:00:00 2001 +From a48f2a8957a3cf8d0eea65868bb9a4af508d29ab Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 May 2016 12:50:33 +0100 -Subject: [PATCH 033/119] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards +Subject: [PATCH 033/147] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards Some SD cards have been found that corrupt data when small blocks are erased. Add a quirk to indicate that ERASE should not be used, @@ -73511,10 +73511,10 @@ index eb0151bac50c1fd796f479d017bc3c3d7017c9e9..fa4e6454456747f02a10621f4f4da3ac unsigned int erase_shift; /* if erase unit is power 2 */ unsigned int pref_erase; /* in sectors */ -From 059916f5d9b5f01c9a530c6a78aa3ab25dd03acf Mon Sep 17 00:00:00 2001 +From b2c4b172ce70202b57a0e950d23eeeec95f50cdf Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 034/119] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 034/147] cma: Add vc_cma driver to enable use of CMA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -74857,10 +74857,10 @@ index 0000000000000000000000000000000000000000..be2819d5d41f9d5ed65daf8eedb94c9e + +#endif /* VC_CMA_H */ -From 7ba0eac61216f2fc6f77787bdef5f1a21dea0592 Mon Sep 17 00:00:00 2001 +From c01592db94e855932c73bcbf9bb48194e787e458 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 035/119] bcm2708: alsa sound driver +Subject: [PATCH 035/147] bcm2708: alsa sound driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -77597,10 +77597,10 @@ index 0000000000000000000000000000000000000000..af3e6eb690113fc32ce9e06bd2f0f294 + +#endif // _VC_AUDIO_DEFS_H_ -From 194cbe936e536cc4876eb6007d71d996e49f211c Mon Sep 17 00:00:00 2001 +From 70d44377b1d1c043ee604bf2e48af32dbaf9baed Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 036/119] bcm2708 vchiq driver +Subject: [PATCH 036/147] bcm2708 vchiq driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -90965,10 +90965,10 @@ index 0000000000000000000000000000000000000000..b6bfa21155e431e93bfb2c149d324371 + return vchiq_build_time; +} -From ad1a93c2808e2aebdb764dcfac75f0b43414c4cb Mon Sep 17 00:00:00 2001 +From 3185ab91ef5e15f3d66cb6e633f281dc911a54d2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 16:07:06 +0100 -Subject: [PATCH 037/119] vc_mem: Add vc_mem driver +Subject: [PATCH 037/147] vc_mem: Add vc_mem driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -91973,10 +91973,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From ecb5b0d56a6624be0b6a31bd257cf2e4418e036f Mon Sep 17 00:00:00 2001 +From 0a74a26624f275e2b8faf03b36248bea81f7f05a Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 038/119] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 038/147] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -96394,10 +96394,10 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From 971d989c31abb4fd06b79ea031ef1f87f544ffd0 Mon Sep 17 00:00:00 2001 +From d77c0664822e7bb1f7f84a17dcf8025ac5b8eb56 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 039/119] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 039/147] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -96708,10 +96708,10 @@ index 0000000000000000000000000000000000000000..911f5b7393ed48ceed8751f06967ae64 +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From dd9172e87a7c4dbabcf76b18394053200e3f55f9 Mon Sep 17 00:00:00 2001 +From 4b8feaf281d9bc26c4605e01d4d73df7a0c7c945 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 040/119] Add SMI driver +Subject: [PATCH 040/147] Add SMI driver Signed-off-by: Luke Wren --- @@ -98662,10 +98662,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From 5818b17dce756d4b6641cb9be44fce33a040f55d Mon Sep 17 00:00:00 2001 +From cb01349c580ed733d8ad12bedc9e356594198a84 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 041/119] Add SMI NAND driver +Subject: [PATCH 041/147] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -99030,10 +99030,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 7a837ee40843ef864ea0293624413502163ba296 Mon Sep 17 00:00:00 2001 +From c4b19f99a1cd44bc03ccfac3a43d8769f6f99da5 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 042/119] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 042/147] lirc: added support for RaspberryPi GPIO lirc_rpi: Use read_current_timer to determine transmitter delay. Thanks to jjmz and others See: https://github.com/raspberrypi/linux/issues/525 @@ -99896,10 +99896,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From fe2b750f71020202b9937fcc1e5ed3c7a18ca352 Mon Sep 17 00:00:00 2001 +From c7acf5288800f2976b1e19cc1098debcfadc1d1f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 043/119] Add cpufreq driver +Subject: [PATCH 043/147] Add cpufreq driver Signed-off-by: popcornmix --- @@ -100161,10 +100161,10 @@ index 0000000000000000000000000000000000000000..3eb9e9326231b08e6ee95ad486485245 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From ae77f68524aad87d4fc3aea49cc7498299fca815 Mon Sep 17 00:00:00 2001 +From 34b8059258cddf3ed033ad686ed1708e72c04868 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 044/119] Added hwmon/thermal driver for reporting core +Subject: [PATCH 044/147] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -100330,10 +100330,10 @@ index 0000000000000000000000000000000000000000..c63fb9f9d143e19612a18fe530c7b2b3 +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); -From 32df8f5f8e1725feb1050e598e8abb4b4be89160 Mon Sep 17 00:00:00 2001 +From 5410fbba7eb97934edc2efe25c9ede309b273003 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 045/119] Add Chris Boot's i2c driver +Subject: [PATCH 045/147] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -100990,10 +100990,10 @@ index 0000000000000000000000000000000000000000..c9b8e5cb1702e4b20e45214d81a7a40a +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 76034201214bc189260a389df7be9399728106d8 Mon Sep 17 00:00:00 2001 +From f5f094ee0ccabb23fb21e6a65034cbaad902def3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:27:06 +0200 -Subject: [PATCH 046/119] char: broadcom: Add vcio module +Subject: [PATCH 046/147] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -101219,10 +101219,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From d0d20dbe6324c801264548804a7c5b9b91e1f6f8 Mon Sep 17 00:00:00 2001 +From d9e4244fbe3616d0276b4769e9206c9f85ef296a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 26 Jun 2015 14:25:01 +0200 -Subject: [PATCH 047/119] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 047/147] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -101328,10 +101328,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..b980d531b35b9981a88356ef1c8a7b86 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From bbc37de942cdaf0d228877d68cd7142bdd5e1a6d Mon Sep 17 00:00:00 2001 +From 05c2d118d76a88e6daba0208a7aa8c82bfd2731d Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 048/119] bcm2835: add v4l2 camera device +Subject: [PATCH 048/147] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -109063,10 +109063,10 @@ index 0000000000000000000000000000000000000000..9d1d11e4a53e510c04a416d92d195a7d + +#endif /* MMAL_VCHIQ_H */ -From 94b6390e2812b2d593a3ff00b8cdceaa0bc5bbb1 Mon Sep 17 00:00:00 2001 +From faac72f00a2a9e71a576e79a36af0fc1f883492b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 049/119] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 049/147] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -109578,10 +109578,10 @@ index 0000000000000000000000000000000000000000..78c5845d2f01deb04b477327d83fa606 + return $trailer; +} -From 0e1c7da845ceb22cd786b030ac9e413cb17f0a67 Mon Sep 17 00:00:00 2001 +From b18e3551828f8b21139bc1215aac346c7b98d3ad Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 10 Aug 2015 09:49:15 +0100 -Subject: [PATCH 050/119] scripts/dtc: Update to upstream version 1.4.1 +Subject: [PATCH 050/147] scripts/dtc: Update to upstream version 1.4.1 Includes the new localfixups format. @@ -112432,10 +112432,10 @@ index ad9b05ae698b0495ecbda42ffcf4743555313a27..2595dfda020fd9e03f0beff5006f229d -#define DTC_VERSION "DTC 1.4.1-g53bf130b" +#define DTC_VERSION "DTC 1.4.1-g25efc119" -From 0aafad9829488449cd46d0166a57c94036578f3e Mon Sep 17 00:00:00 2001 +From 156a93f3d8305f601b1b8ee292b554256a48d9bd Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 051/119] BCM2708: Add core Device Tree support +Subject: [PATCH 051/147] BCM2708: Add core Device Tree support Add the bare minimum needed to boot BCM2708 from a Device Tree. @@ -112514,8 +112514,8 @@ BCM270X_DT: Use clk_core for I2C interfaces arch/arm/boot/dts/bcm2710.dtsi | 102 ++ arch/arm/boot/dts/bcm2835-rpi-cm.dts | 93 ++ arch/arm/boot/dts/bcm2835-rpi-cm.dtsi | 30 + - arch/arm/boot/dts/overlays/Makefile | 106 ++ - arch/arm/boot/dts/overlays/README | 1229 ++++++++++++++++++++ + arch/arm/boot/dts/overlays/Makefile | 105 ++ + arch/arm/boot/dts/overlays/README | 1223 ++++++++++++++++++++ .../arm/boot/dts/overlays/adau1977-adc-overlay.dts | 53 + arch/arm/boot/dts/overlays/ads1015-overlay.dts | 98 ++ arch/arm/boot/dts/overlays/ads7846-overlay.dts | 89 ++ @@ -112544,7 +112544,6 @@ BCM270X_DT: Use clk_core for I2C interfaces .../arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts | 61 + .../arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts | 37 + .../boot/dts/overlays/i2s-gpio28-31-overlay.dts | 18 + - arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts | 13 + arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 43 + .../boot/dts/overlays/iqaudio-dacplus-overlay.dts | 46 + .../overlays/iqaudio-digi-wm8804-audio-overlay.dts | 47 + @@ -112600,7 +112599,7 @@ BCM270X_DT: Use clk_core for I2C interfaces arch/arm/boot/dts/overlays/w1-gpio-overlay.dts | 39 + .../boot/dts/overlays/w1-gpio-pullup-overlay.dts | 41 + arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 + - 99 files changed, 7749 insertions(+) + 98 files changed, 7729 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b.dts create mode 100755 arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -112643,7 +112642,6 @@ BCM270X_DT: Use clk_core for I2C interfaces create mode 100644 arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/i2s-gpio28-31-overlay.dts - create mode 100644 arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/iqaudio-dacplus-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/iqaudio-digi-wm8804-audio-overlay.dts @@ -114511,10 +114509,10 @@ index 0000000000000000000000000000000000000000..9c4000fc686a9882b9ddde24fdcf937d +}; diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile new file mode 100644 -index 0000000000000000000000000000000000000000..7e740c894436e8fd9ed9b451e5b1f7888806922f +index 0000000000000000000000000000000000000000..e6e2bfb85fbc257ea851c9f2afa5f78a87cdc41d --- /dev/null +++ b/arch/arm/boot/dts/overlays/Makefile -@@ -0,0 +1,106 @@ +@@ -0,0 +1,105 @@ +ifeq ($(CONFIG_OF),y) + +# Overlays for the Raspberry Pi platform @@ -114557,7 +114555,6 @@ index 0000000000000000000000000000000000000000..7e740c894436e8fd9ed9b451e5b1f788 +dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo +dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo +dtbo-$(RPI_DT_OVERLAYS) += i2s-gpio28-31.dtbo -+dtbo-$(RPI_DT_OVERLAYS) += i2s-mmap.dtbo +dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dac.dtbo +dtbo-$(RPI_DT_OVERLAYS) += iqaudio-dacplus.dtbo +dtbo-$(RPI_DT_OVERLAYS) += iqaudio-digi-wm8804-audio.dtbo @@ -114623,10 +114620,10 @@ index 0000000000000000000000000000000000000000..7e740c894436e8fd9ed9b451e5b1f788 +clean-files := *.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README new file mode 100644 -index 0000000000000000000000000000000000000000..780bf6dda5a6694cb312140329120fda3b0c2f61 +index 0000000000000000000000000000000000000000..3cc6560de2000480294688ec80bc8b26caf255d8 --- /dev/null +++ b/arch/arm/boot/dts/overlays/README -@@ -0,0 +1,1229 @@ +@@ -0,0 +1,1223 @@ +Introduction +============ + @@ -115133,12 +115130,6 @@ index 0000000000000000000000000000000000000000..780bf6dda5a6694cb312140329120fda +Params: + + -+Name: i2s-mmap -+Info: Enables mmap support in the bcm2708-i2s driver -+Load: dtoverlay=i2s-mmap -+Params: -+ -+ +Name: iqaudio-dac +Info: Configures the IQaudio DAC audio card +Load: dtoverlay=iqaudio-dac, @@ -117524,25 +117515,6 @@ index 0000000000000000000000000000000000000000..30c356d6070cc3b1dfd1d5a07dc10213 + }; + }; +}; -diff --git a/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts b/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..a11160afa4bfb2aeda5937b3b1138bb1f9b9b0f8 ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/i2s-mmap-overlay.dts -@@ -0,0 +1,13 @@ -+/dts-v1/; -+/plugin/; -+ -+/{ -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&i2s>; -+ __overlay__ { -+ brcm,enable-mmap; -+ }; -+ }; -+}; diff --git a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..0d35c85382bb5766b3eeb9de1bd4a94621229e4b @@ -121059,10 +121031,10 @@ index 0000000000000000000000000000000000000000..8498134fdbb3912e9ce18282b53084d8 + +}; -From 08ad6c196e2efc2181274ebf686fcf00a0277ffa Mon Sep 17 00:00:00 2001 +From bf3f1605a56696a7531fd4b0c5a9051798ab8a2c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 20:00:21 +0000 -Subject: [PATCH 052/119] BCM270X_DT: Add a .dtbo target, use for overlays +Subject: [PATCH 052/147] BCM270X_DT: Add a .dtbo target, use for overlays Change the filenames and extensions to keep the pre-DDT style of overlay (-overlay.dtb) distinct from new ones that use a @@ -121145,10 +121117,10 @@ index e7df0f5db7ec273f45b755668815ce96ba1ffe46..8f50f48329b9460b7268322ea4fd99cf # Bzip2 -From 1f191b8bb3632388ea155815b8fad006921f2ff5 Mon Sep 17 00:00:00 2001 +From ddef78ed49a7bf47a097dff8b04542bb0a70d353 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 8 Apr 2016 17:43:27 +0100 -Subject: [PATCH 053/119] BCM270X_DT: Don't generate "linux,phandle" props +Subject: [PATCH 053/147] BCM270X_DT: Don't generate "linux,phandle" props The EPAPR standard says to use "phandle" properties to store phandles, rather than the deprecated "linux,phandle" version. By default, dtc @@ -121174,10 +121146,10 @@ index 8f50f48329b9460b7268322ea4fd99cf764134ec..c1c3ceb265a3fd223b8a2a0a548ddad3 -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -From ca9e434ec3cded3fc7797577f245a0b80c56db86 Mon Sep 17 00:00:00 2001 +From e8385139248a1b537cd7cbba36ee6667ef663a38 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 054/119] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 054/147] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -121353,10 +121325,10 @@ index e5e7f2e80a54dd2f15737a3ef478287458641f6e..68086e559d963ed06a0ceb916f9b1555 /* Set LED brightness level * Must not sleep. Use brightness_set_blocking for drivers -From 8244c1243b3a8a539202e12d8c0ea9f83e7e9006 Mon Sep 17 00:00:00 2001 +From 3546b9fd0fa06f93e5543541ad20a2a4327f8528 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 055/119] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 055/147] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -121449,10 +121421,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..fa72af0c981710fe80bacf4cf6612f6d #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ -From 45ead68a64257fa9197d1982a9630b6d63a00506 Mon Sep 17 00:00:00 2001 +From 95afd5fc5890bde189a8facad85422caf978cd49 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 056/119] Speed up console framebuffer imageblit function +Subject: [PATCH 056/147] Speed up console framebuffer imageblit function Especially on platforms with a slower CPU but a relatively high framebuffer fill bandwidth, like current ARM devices, the existing @@ -121661,10 +121633,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 4d609b22de42d7a28825e8c01072a158c5d933fa Mon Sep 17 00:00:00 2001 +From ee8a19213da7d9e35eaa347eee4ee0eef598872e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 057/119] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 057/147] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) 1-wire: Add support for configuring pin for w1-gpio kernel module @@ -121914,10 +121886,10 @@ index d58594a3232492e33f1dd4babd3798b03e0f0203..feae94256256316fd9d850c3d83325af unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; -From 748bb26b92f0d95785fb5cdd2a9d45dd51f12bfe Mon Sep 17 00:00:00 2001 +From 69204bb41f50db8096f8cb0e2fe36daa8d10bed1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 058/119] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 058/147] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -121967,10 +121939,10 @@ index e0be49fc382fc339269b9be29fda59d4ad619962..9b31046d0b00c66d86c1b07003a79edb * css_tryget_online_from_dir - get corresponding css from a cgroup dentry * @dentry: directory dentry of interest -From 6dd642c1b1cc9c115d4c01efb57aa6809dd65141 Mon Sep 17 00:00:00 2001 +From 4a0d7c358be9f572951e2455ef8626881856f3a0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 059/119] config: Add default configs +Subject: [PATCH 059/147] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1288 +++++++++++++++++++++++++++++++++++ @@ -124576,10 +124548,10 @@ index 0000000000000000000000000000000000000000..da2df3d30e15a55a34b45d3ebbf98e90 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From d73facf6d6b137986b32524a9c537257158fa327 Mon Sep 17 00:00:00 2001 +From edcb86594d3b1b4cf8a63144026aa5a3c86e7151 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 060/119] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 060/147] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -124615,10 +124587,10 @@ index ae83af649a607f67239f1a64bf45dd4b5770cc7d..4a7af9d0b910f59d17421ce14138400d ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From a92b385cc450a5be2f972c887800486a66de284a Mon Sep 17 00:00:00 2001 +From 4053f80d2c46fa0790a6c2e238970b6fd7498659 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 061/119] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 061/147] rpi-ft5406: Add touchscreen driver for pi LCD display Fix driver detection failure Check that the buffer response is non-zero meaning the touchscreen was detected @@ -124913,10 +124885,10 @@ index 0000000000000000000000000000000000000000..b27dbee8f56773dbd2a5503dc864747d +MODULE_DESCRIPTION("Touchscreen driver for memory based FT5406"); +MODULE_LICENSE("GPL"); -From 913c6388aff7ef8c8627afc87e98e48ef62354fd Mon Sep 17 00:00:00 2001 +From 8030019a87b5c49814a70fde1d43c627e4856257 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Oct 2014 11:47:53 +0100 -Subject: [PATCH 062/119] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 062/147] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -126472,10 +126444,10 @@ index 6bd1089b07e0960830ed6bd6a8345202b7efd8b0..cd17dd11ebe7bbe00089e70cd2ccea74 static unsigned long noinline __clear_user_memset(void __user *addr, unsigned long n) -From 62b45f2357d402f01c1fa29999c4c89205e4aa23 Mon Sep 17 00:00:00 2001 +From eea678be3935ae755bf57db99215e8b4c9a540be Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 063/119] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 063/147] gpio-poweroff: Allow it to work on Raspberry Pi The Raspberry Pi firmware manages the power-down and reboot process. To do this it installs a pm_power_off handler, causing @@ -126510,10 +126482,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From 72b1e5e08bb0ac0726001beab05f2ff6ea496a05 Mon Sep 17 00:00:00 2001 +From 485faf73668700d52500ac01a4d30d6908f22795 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 064/119] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 064/147] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -127379,10 +127351,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From 2c71a1fe648524a406517c1983592bbfccb9345d Mon Sep 17 00:00:00 2001 +From 663e04b7e70254f8ddb5e304e3c95562fb37f7cb Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 065/119] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 065/147] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -127553,10 +127525,10 @@ index 0000000000000000000000000000000000000000..29ecc08a227cdd4b3c6141935d0c5d21 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From a9b4367962afa0dc8a09d11758e2c2de413f9e15 Mon Sep 17 00:00:00 2001 +From 984921f4b37192cfe97eba4ca299ad8aac437093 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 066/119] ASoC: Add support for Rpi-DAC +Subject: [PATCH 066/147] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -127840,10 +127812,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From e9fb8467d1f8c182a3c2fcc2092f7166a6626ede Mon Sep 17 00:00:00 2001 +From d86f8bf7c0a0e681fdc6c6cd329b8d4fa39c22f6 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 067/119] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 067/147] ASoC: wm8804: Implement MCLK configuration options, add 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs for most sample rates. At 192kHz only 128xfs is supported. The existing driver selects 128xfs automatically for some lower samples rates. By using an @@ -127892,10 +127864,10 @@ index 8d914702cae4a3fe2c0ca0599cd1ec79f7322c83..c846716b4ed1027ade5512e8be90801d .dapm_widgets = wm8804_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm8804_dapm_widgets), -From 79656ad7e01c9ed51f8b66ce45ec370e73c18a65 Mon Sep 17 00:00:00 2001 +From e9aae845fc9a8eb1acf1d39e174b796d5d8c33a7 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 068/119] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 068/147] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -128183,10 +128155,10 @@ index 0000000000000000000000000000000000000000..9840e15d3e2be6396bc3ce6e74749408 +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 22f66d64612f480e18c40432580c26c9b87b4e07 Mon Sep 17 00:00:00 2001 +From 0fdc56dfbbbc1de8767c78b14c903c10ba72f6a7 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 069/119] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 069/147] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -128516,10 +128488,10 @@ index 0000000000000000000000000000000000000000..4e8e6dec14bcf4a1ff286c43742d4097 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From 5fe905d5530a80cd548236e0d4d205f064756233 Mon Sep 17 00:00:00 2001 +From 037745aa761b5ecc5abfe2229ed55e2a4be7355f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jul 2016 17:06:50 +0100 -Subject: [PATCH 070/119] iqaudio-dac: Compile fix - untested +Subject: [PATCH 070/147] iqaudio-dac: Compile fix - untested --- sound/soc/bcm/iqaudio-dac.c | 6 +++++- @@ -128543,10 +128515,10 @@ index 4e8e6dec14bcf4a1ff286c43742d4097249d6777..aa15bc4b49ca95edec905fddd8fd0a6d if (dapm->dev != codec_dai->dev) return 0; -From 951c89af714e4ab5c5d7b77d2de7f62599480274 Mon Sep 17 00:00:00 2001 +From cd727bd96a96c8c5dbce6ba443cbf67b5e8594d2 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 071/119] Added support for HiFiBerry DAC+ +Subject: [PATCH 071/147] Added support for HiFiBerry DAC+ The driver is based on the HiFiBerry DAC driver. However HiFiBerry DAC+ uses a different codec chip (PCM5122), therefore a new driver is necessary. @@ -129175,10 +129147,10 @@ index 047c48953a20cd4075000ac294a17fe59baedcde..090fe0ee08e8765f9edbb62777413bb6 dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From d0e800534e3c1cbfd6fd130cfa344643b2d33d41 Mon Sep 17 00:00:00 2001 +From 72abd2161e8f0970a08ef92e90e8cbe15453730a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 072/119] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 072/147] Added driver for HiFiBerry Amp amplifier add-on board The driver contains a low-level hardware driver for the TAS5713 and the drivers for the Raspberry Pi I2S subsystem. @@ -130010,10 +129982,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 8dd563be7049a34ac038e20b9fe16878d8b0d045 Mon Sep 17 00:00:00 2001 +From 872f6e9351e5148b57876f450f802035129fa0a8 Mon Sep 17 00:00:00 2001 From: "Daniel Matuschek (HiFiBerry)" Date: Tue, 26 Jul 2016 19:16:25 +0200 -Subject: [PATCH 073/119] Added HiFiBerry Digi+ Pro driver +Subject: [PATCH 073/147] Added HiFiBerry Digi+ Pro driver Signed-off-by: Daniel Matuschek --- @@ -130025,7 +129997,7 @@ Signed-off-by: Daniel Matuschek create mode 100644 arch/arm/boot/dts/overlays/hifiberry-digi-pro-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 7e740c894436e8fd9ed9b451e5b1f7888806922f..d4f31b76931d693a09ced67ef8da900a884892ae 100644 +index e6e2bfb85fbc257ea851c9f2afa5f78a87cdc41d..68832129f46b9c8320d0d2634c780bdb330314c9 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -31,6 +31,7 @@ dtbo-$(RPI_DT_OVERLAYS) += hifiberry-amp.dtbo @@ -130037,7 +130009,7 @@ index 7e740c894436e8fd9ed9b451e5b1f7888806922f..d4f31b76931d693a09ced67ef8da900a dtbo-$(RPI_DT_OVERLAYS) += hy28b.dtbo dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 780bf6dda5a6694cb312140329120fda3b0c2f61..57100ecd45721761546c443a3d6196d6e18879c6 100644 +index 3cc6560de2000480294688ec80bc8b26caf255d8..b32bca8ada3b10aa40a5c718a1823e1fa4f7f5b2 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -377,11 +377,17 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec @@ -130207,10 +130179,10 @@ index 9840e15d3e2be6396bc3ce6e74749408cc28c333..52ab9dea2e724c4238986ca53c59c849 ret = snd_soc_register_card(&snd_rpi_hifiberry_digi); -From 72820fee2ecf89e2f7a4ef82027c90b8f6b70037 Mon Sep 17 00:00:00 2001 +From 1524026ceed15fb3c928275c998d5db5b2658ee8 Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 074/119] Update ds1307 driver for device-tree support +Subject: [PATCH 074/147] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -130237,10 +130209,10 @@ index 821d9c089cdb48a40a244d1c18ab912d6f0b9432..409ed8e449e54ea6751185b1c0760cfc .driver = { .name = "rtc-ds1307", -From 023ea30560a19eed47c4f805f9b9ea06b7ec3ff6 Mon Sep 17 00:00:00 2001 +From 6eb5e4d561b2a5df47a08609cbe940be0e1a2b40 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 075/119] Add driver for rpi-proto +Subject: [PATCH 075/147] Add driver for rpi-proto Forward port of 3.10.x driver from https://github.com/koalo We are using a custom board and would like to use rpi 3.18.x @@ -130456,10 +130428,10 @@ index 0000000000000000000000000000000000000000..9db678e885efd63d84d60a098a84ed67 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From e2e8c864749a79c7642a30a9a79a539ad698c872 Mon Sep 17 00:00:00 2001 +From 39035d86d5d50002e7efb7a3fe277897b2f8b0ef Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 076/119] RaspiDAC3 support +Subject: [PATCH 076/147] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -130708,10 +130680,10 @@ index 0000000000000000000000000000000000000000..e7422e2dd3d70622a48ab3b2e1929869 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 811042dba5cb49d063d49654c80b039bae7dd7a6 Mon Sep 17 00:00:00 2001 +From 6ad06c414a9e23331fca61bd0c8b1b21808b3393 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:02:34 +0100 -Subject: [PATCH 077/119] tpa6130a2: Add headphone switch control +Subject: [PATCH 077/147] tpa6130a2: Add headphone switch control Signed-off-by: Jan Grulich --- @@ -130802,10 +130774,10 @@ index 11d85c5c787addb8d8add7fc2b52ab91cc49b63d..3caaa17e28e91e995d6781ca7f88b747 /* -From c16136f1fe865aefadbbe1d2900a8484ca2fb7fb Mon Sep 17 00:00:00 2001 +From 4483456f487baf145a7bed1735c17975d383a064 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 078/119] Add Support for JustBoom Audio boards +Subject: [PATCH 078/147] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -131259,10 +131231,10 @@ index 0000000000000000000000000000000000000000..91acb666380faa3c0deb2230f8a0f8bb +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From 6c495e02ccebc9dd1d11f563f58a7d6dab5a693a Mon Sep 17 00:00:00 2001 +From 357a22cd1437212f0a6471b8e80204b507086397 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 079/119] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 079/147] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -131444,10 +131416,10 @@ index 0000000000000000000000000000000000000000..6e2ee027926ee63c89222f75ceb89e3d +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 3d1b3ba90195ec409f82395661600ed1548e626d Mon Sep 17 00:00:00 2001 +From 22af68fbd5420737fa0b249ad43a00736ce952dc Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 080/119] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 080/147] New AudioInjector.net Pi soundcard with low jitter audio in and out. Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile. @@ -131696,10 +131668,10 @@ index 0000000000000000000000000000000000000000..5ff0985e07efb96b95634a65995f09f7 +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From 1c2df2752dbf675b9335c96e91c89ab2adcac05f Mon Sep 17 00:00:00 2001 +From 29bd38b33ebe65cf466ef59f36bfa86e691d33f6 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 081/119] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 081/147] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -131999,10 +131971,10 @@ index 0000000000000000000000000000000000000000..9b6e829bcb5b1762a853775e78163196 +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From be6f601fc0467382088088a3a8856ab290921f42 Mon Sep 17 00:00:00 2001 +From 6e1df8912f78a2ed6d0e9dd6229c2130036d64f5 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 082/119] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 082/147] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -132475,10 +132447,10 @@ index 0000000000000000000000000000000000000000..446796e7e4c14a7d95b2f2a01211d9a0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From 321645738cac0f80ae22b26529d5886431e04dac Mon Sep 17 00:00:00 2001 +From 051c227e899d74944f8921d8d25ca08634ceb1e9 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 083/119] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 083/147] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -132651,10 +132623,10 @@ index 0000000000000000000000000000000000000000..89e65317512bc774453ac8d0d5b0ff98 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From 2b9ffb0beec1a4b18eda671163e68887cee537d7 Mon Sep 17 00:00:00 2001 +From b8fa35d7047b78d20dcc0d11ce6097a93f751676 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Fri, 17 Jun 2016 14:48:16 +1000 -Subject: [PATCH 084/119] ASoc: wm8731: add 32bit mode. +Subject: [PATCH 084/147] ASoc: wm8731: add 32bit mode. commit cf5ef3a299ba32f6ac24c3c6ba18c1b7f1b5475f upstream. @@ -132693,963 +132665,10 @@ index 4bcf5f8ece50f3681948a9fbc47b85400d9a8b51..d18261a442560cd2c108c34295bd5b17 static const struct snd_soc_dai_ops wm8731_dai_ops = { .startup = wm8731_startup, -From b60575dbbfb801c4c10f60fbbc969fa0b1ae54c2 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 1 Jun 2016 15:40:58 +0100 -Subject: [PATCH 085/119] Revert "ASoC: bcm2835: Add S16_LE support via packed - DMA transfers" - -This reverts commit beff053c0ef6983897e3481169292e6435ef0a2d. ---- - sound/soc/bcm/bcm2835-i2s.c | 9 --------- - 1 file changed, 9 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 6ba20498202ed36906b52096893a88867a79269f..a0026e2d2f0afd700751b1b4fa2523585829173e 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -690,15 +690,6 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].maxburst = 2; - dev->dma_data[SNDRV_PCM_STREAM_CAPTURE].maxburst = 2; - -- /* -- * Set the PACK flag to enable S16_LE support (2 S16_LE values -- * packed into 32-bit transfers). -- */ -- dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].flags = -- SND_DMAENGINE_PCM_DAI_FLAG_PACK; -- dev->dma_data[SNDRV_PCM_STREAM_CAPTURE].flags = -- SND_DMAENGINE_PCM_DAI_FLAG_PACK; -- - /* BCLK ratio - use default */ - dev->bclk_ratio = 0; - - -From 71c559c6050f641d310d771da0e0c5955bd2ddc4 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 1 Jun 2016 15:41:01 +0100 -Subject: [PATCH 086/119] Revert "ASoC: bcm2835: setup clock only if CPU is - clock master" - -This reverts commit 60507fe191f524e82986fa737e5b27b4d3ad9289. ---- - sound/soc/bcm/bcm2835-i2s.c | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index a0026e2d2f0afd700751b1b4fa2523585829173e..d2663e79ece1a2b649377e4a89460aa5a6d150b5 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -276,15 +276,8 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - /* otherwise calculate a fitting block ratio */ - bclk_ratio = 2 * data_length; - -- /* Clock should only be set up here if CPU is clock master */ -- switch (dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) { -- case SND_SOC_DAIFMT_CBS_CFS: -- case SND_SOC_DAIFMT_CBS_CFM: -- clk_set_rate(dev->clk, sampling_rate * bclk_ratio); -- break; -- default: -- break; -- } -+ /* set target clock rate*/ -+ clk_set_rate(dev->clk, sampling_rate * bclk_ratio); - - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; - -From 2cdbbbacfd4f75bcd57e6b7884e9727d7a1d8e2c Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 1 Jun 2016 15:41:03 +0100 -Subject: [PATCH 087/119] Revert "ASoC: bcm2835: add 24bit support" - -This reverts commit a34b027dca5ea840fbc84121db66488375acfdea. ---- - sound/soc/bcm/bcm2835-i2s.c | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index d2663e79ece1a2b649377e4a89460aa5a6d150b5..1c1f2210387b26e9551959378f6792f18648652e 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -259,9 +259,6 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - case SNDRV_PCM_FORMAT_S16_LE: - data_length = 16; - break; -- case SNDRV_PCM_FORMAT_S24_LE: -- data_length = 24; -- break; - case SNDRV_PCM_FORMAT_S32_LE: - data_length = 32; - break; -@@ -282,7 +279,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; - -- if (data_length >= 24) -+ if (data_length > 24) - format |= BCM2835_I2S_CHWEX; - - format |= BCM2835_I2S_CHWID((data_length-8)&0xf); -@@ -573,7 +570,6 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE -- | SNDRV_PCM_FMTBIT_S24_LE - | SNDRV_PCM_FMTBIT_S32_LE - }, - .capture = { -@@ -581,7 +577,6 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE -- | SNDRV_PCM_FMTBIT_S24_LE - | SNDRV_PCM_FMTBIT_S32_LE - }, - .ops = &bcm2835_i2s_dai_ops, - -From 38170c7455fe28858e500124bc82e9647291c907 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 1 Jun 2016 15:41:09 +0100 -Subject: [PATCH 088/119] Revert "ASoC: bcm2835: move to use the clock - framework" - -This reverts commit 517e7a1537ae4663268be5d0c0ec62c563b9fc99. ---- - sound/soc/bcm/bcm2835-i2s.c | 284 ++++++++++++++++++++++++++++++++++---------- - 1 file changed, 220 insertions(+), 64 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 1c1f2210387b26e9551959378f6792f18648652e..3303d5f58082f68b68b535b2bdf7ce8d14cafcc4 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -37,7 +37,6 @@ - #include - #include - #include --#include - #include - - #include -@@ -47,6 +46,55 @@ - #include - #include - -+/* Clock registers */ -+#define BCM2835_CLK_PCMCTL_REG 0x00 -+#define BCM2835_CLK_PCMDIV_REG 0x04 -+ -+/* Clock register settings */ -+#define BCM2835_CLK_PASSWD (0x5a000000) -+#define BCM2835_CLK_PASSWD_MASK (0xff000000) -+#define BCM2835_CLK_MASH(v) ((v) << 9) -+#define BCM2835_CLK_FLIP BIT(8) -+#define BCM2835_CLK_BUSY BIT(7) -+#define BCM2835_CLK_KILL BIT(5) -+#define BCM2835_CLK_ENAB BIT(4) -+#define BCM2835_CLK_SRC(v) (v) -+ -+#define BCM2835_CLK_SHIFT (12) -+#define BCM2835_CLK_DIVI(v) ((v) << BCM2835_CLK_SHIFT) -+#define BCM2835_CLK_DIVF(v) (v) -+#define BCM2835_CLK_DIVF_MASK (0xFFF) -+ -+enum { -+ BCM2835_CLK_MASH_0 = 0, -+ BCM2835_CLK_MASH_1, -+ BCM2835_CLK_MASH_2, -+ BCM2835_CLK_MASH_3, -+}; -+ -+enum { -+ BCM2835_CLK_SRC_GND = 0, -+ BCM2835_CLK_SRC_OSC, -+ BCM2835_CLK_SRC_DBG0, -+ BCM2835_CLK_SRC_DBG1, -+ BCM2835_CLK_SRC_PLLA, -+ BCM2835_CLK_SRC_PLLC, -+ BCM2835_CLK_SRC_PLLD, -+ BCM2835_CLK_SRC_HDMI, -+}; -+ -+/* Most clocks are not useable (freq = 0) */ -+static const unsigned int bcm2835_clk_freq[BCM2835_CLK_SRC_HDMI+1] = { -+ [BCM2835_CLK_SRC_GND] = 0, -+ [BCM2835_CLK_SRC_OSC] = 19200000, -+ [BCM2835_CLK_SRC_DBG0] = 0, -+ [BCM2835_CLK_SRC_DBG1] = 0, -+ [BCM2835_CLK_SRC_PLLA] = 0, -+ [BCM2835_CLK_SRC_PLLC] = 0, -+ [BCM2835_CLK_SRC_PLLD] = 500000000, -+ [BCM2835_CLK_SRC_HDMI] = 0, -+}; -+ - /* I2S registers */ - #define BCM2835_I2S_CS_A_REG 0x00 - #define BCM2835_I2S_FIFO_A_REG 0x04 -@@ -110,6 +158,10 @@ - #define BCM2835_I2S_INT_RXR BIT(1) - #define BCM2835_I2S_INT_TXW BIT(0) - -+/* I2S DMA interface */ -+/* FIXME: Needs IOMMU support */ -+#define BCM2835_VCMMU_SHIFT (0x7E000000 - 0x20000000) -+ - /* General device struct */ - struct bcm2835_i2s_dev { - struct device *dev; -@@ -117,23 +169,21 @@ struct bcm2835_i2s_dev { - unsigned int fmt; - unsigned int bclk_ratio; - -- struct regmap *i2s_regmap; -- struct clk *clk; -- bool clk_prepared; -+ struct regmap *i2s_regmap; -+ struct regmap *clk_regmap; - }; - - static void bcm2835_i2s_start_clock(struct bcm2835_i2s_dev *dev) - { -+ /* Start the clock if in master mode */ - unsigned int master = dev->fmt & SND_SOC_DAIFMT_MASTER_MASK; - -- if (dev->clk_prepared) -- return; -- - switch (master) { - case SND_SOC_DAIFMT_CBS_CFS: - case SND_SOC_DAIFMT_CBS_CFM: -- clk_prepare_enable(dev->clk); -- dev->clk_prepared = true; -+ regmap_update_bits(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_PASSWD_MASK | BCM2835_CLK_ENAB, -+ BCM2835_CLK_PASSWD | BCM2835_CLK_ENAB); - break; - default: - break; -@@ -142,9 +192,28 @@ static void bcm2835_i2s_start_clock(struct bcm2835_i2s_dev *dev) - - static void bcm2835_i2s_stop_clock(struct bcm2835_i2s_dev *dev) - { -- if (dev->clk_prepared) -- clk_disable_unprepare(dev->clk); -- dev->clk_prepared = false; -+ uint32_t clkreg; -+ int timeout = 1000; -+ -+ /* Stop clock */ -+ regmap_update_bits(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_PASSWD_MASK | BCM2835_CLK_ENAB, -+ BCM2835_CLK_PASSWD); -+ -+ /* Wait for the BUSY flag going down */ -+ while (--timeout) { -+ regmap_read(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, &clkreg); -+ if (!(clkreg & BCM2835_CLK_BUSY)) -+ break; -+ } -+ -+ if (!timeout) { -+ /* KILL the clock */ -+ dev_err(dev->dev, "I2S clock didn't stop. Kill the clock!\n"); -+ regmap_update_bits(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_KILL | BCM2835_CLK_PASSWD_MASK, -+ BCM2835_CLK_KILL | BCM2835_CLK_PASSWD); -+ } - } - - static void bcm2835_i2s_clear_fifos(struct bcm2835_i2s_dev *dev, -@@ -154,7 +223,8 @@ static void bcm2835_i2s_clear_fifos(struct bcm2835_i2s_dev *dev, - uint32_t syncval; - uint32_t csreg; - uint32_t i2s_active_state; -- bool clk_was_prepared; -+ uint32_t clkreg; -+ uint32_t clk_active_state; - uint32_t off; - uint32_t clr; - -@@ -168,10 +238,15 @@ static void bcm2835_i2s_clear_fifos(struct bcm2835_i2s_dev *dev, - regmap_read(dev->i2s_regmap, BCM2835_I2S_CS_A_REG, &csreg); - i2s_active_state = csreg & (BCM2835_I2S_RXON | BCM2835_I2S_TXON); - -+ regmap_read(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, &clkreg); -+ clk_active_state = clkreg & BCM2835_CLK_ENAB; -+ - /* Start clock if not running */ -- clk_was_prepared = dev->clk_prepared; -- if (!clk_was_prepared) -- bcm2835_i2s_start_clock(dev); -+ if (!clk_active_state) { -+ regmap_update_bits(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_PASSWD_MASK | BCM2835_CLK_ENAB, -+ BCM2835_CLK_PASSWD | BCM2835_CLK_ENAB); -+ } - - /* Stop I2S module */ - regmap_update_bits(dev->i2s_regmap, BCM2835_I2S_CS_A_REG, off, 0); -@@ -205,7 +280,7 @@ static void bcm2835_i2s_clear_fifos(struct bcm2835_i2s_dev *dev, - dev_err(dev->dev, "I2S SYNC error!\n"); - - /* Stop clock if it was not running before */ -- if (!clk_was_prepared) -+ if (!clk_active_state) - bcm2835_i2s_stop_clock(dev); - - /* Restore I2S state */ -@@ -234,9 +309,19 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai) - { - struct bcm2835_i2s_dev *dev = snd_soc_dai_get_drvdata(dai); -+ - unsigned int sampling_rate = params_rate(params); - unsigned int data_length, data_delay, bclk_ratio; - unsigned int ch1pos, ch2pos, mode, format; -+ unsigned int mash = BCM2835_CLK_MASH_1; -+ unsigned int divi, divf, target_frequency; -+ int clk_src = -1; -+ unsigned int master = dev->fmt & SND_SOC_DAIFMT_MASTER_MASK; -+ bool bit_master = (master == SND_SOC_DAIFMT_CBS_CFS -+ || master == SND_SOC_DAIFMT_CBS_CFM); -+ -+ bool frame_master = (master == SND_SOC_DAIFMT_CBS_CFS -+ || master == SND_SOC_DAIFMT_CBM_CFS); - uint32_t csreg; - - /* -@@ -258,9 +343,11 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - switch (params_format(params)) { - case SNDRV_PCM_FORMAT_S16_LE: - data_length = 16; -+ bclk_ratio = 40; - break; - case SNDRV_PCM_FORMAT_S32_LE: - data_length = 32; -+ bclk_ratio = 80; - break; - default: - return -EINVAL; -@@ -269,12 +356,69 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - /* If bclk_ratio already set, use that one. */ - if (dev->bclk_ratio) - bclk_ratio = dev->bclk_ratio; -- else -- /* otherwise calculate a fitting block ratio */ -- bclk_ratio = 2 * data_length; - -- /* set target clock rate*/ -- clk_set_rate(dev->clk, sampling_rate * bclk_ratio); -+ /* -+ * Clock Settings -+ * -+ * The target frequency of the bit clock is -+ * sampling rate * frame length -+ * -+ * Integer mode: -+ * Sampling rates that are multiples of 8000 kHz -+ * can be driven by the oscillator of 19.2 MHz -+ * with an integer divider as long as the frame length -+ * is an integer divider of 19200000/8000=2400 as set up above. -+ * This is no longer possible if the sampling rate -+ * is too high (e.g. 192 kHz), because the oscillator is too slow. -+ * -+ * MASH mode: -+ * For all other sampling rates, it is not possible to -+ * have an integer divider. Approximate the clock -+ * with the MASH module that induces a slight frequency -+ * variance. To minimize that it is best to have the fastest -+ * clock here. That is PLLD with 500 MHz. -+ */ -+ target_frequency = sampling_rate * bclk_ratio; -+ clk_src = BCM2835_CLK_SRC_OSC; -+ mash = BCM2835_CLK_MASH_0; -+ -+ if (bcm2835_clk_freq[clk_src] % target_frequency == 0 -+ && bit_master && frame_master) { -+ divi = bcm2835_clk_freq[clk_src] / target_frequency; -+ divf = 0; -+ } else { -+ uint64_t dividend; -+ -+ if (!dev->bclk_ratio) { -+ /* -+ * Overwrite bclk_ratio, because the -+ * above trick is not needed or can -+ * not be used. -+ */ -+ bclk_ratio = 2 * data_length; -+ } -+ -+ target_frequency = sampling_rate * bclk_ratio; -+ -+ clk_src = BCM2835_CLK_SRC_PLLD; -+ mash = BCM2835_CLK_MASH_1; -+ -+ dividend = bcm2835_clk_freq[clk_src]; -+ dividend <<= BCM2835_CLK_SHIFT; -+ do_div(dividend, target_frequency); -+ divi = dividend >> BCM2835_CLK_SHIFT; -+ divf = dividend & BCM2835_CLK_DIVF_MASK; -+ } -+ -+ /* Set clock divider */ -+ regmap_write(dev->clk_regmap, BCM2835_CLK_PCMDIV_REG, BCM2835_CLK_PASSWD -+ | BCM2835_CLK_DIVI(divi) -+ | BCM2835_CLK_DIVF(divf)); -+ -+ /* Setup clock, but don't start it yet */ -+ regmap_write(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, BCM2835_CLK_PASSWD -+ | BCM2835_CLK_MASH(mash) -+ | BCM2835_CLK_SRC(clk_src)); - - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; -@@ -548,7 +692,7 @@ static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = { - .trigger = bcm2835_i2s_trigger, - .hw_params = bcm2835_i2s_hw_params, - .set_fmt = bcm2835_i2s_set_dai_fmt, -- .set_bclk_ratio = bcm2835_i2s_set_dai_bclk_ratio, -+ .set_bclk_ratio = bcm2835_i2s_set_dai_bclk_ratio - }; - - static int bcm2835_i2s_dai_probe(struct snd_soc_dai *dai) -@@ -606,14 +750,34 @@ static bool bcm2835_i2s_precious_reg(struct device *dev, unsigned int reg) - }; - } - --static const struct regmap_config bcm2835_regmap_config = { -- .reg_bits = 32, -- .reg_stride = 4, -- .val_bits = 32, -- .max_register = BCM2835_I2S_GRAY_REG, -- .precious_reg = bcm2835_i2s_precious_reg, -- .volatile_reg = bcm2835_i2s_volatile_reg, -- .cache_type = REGCACHE_RBTREE, -+static bool bcm2835_clk_volatile_reg(struct device *dev, unsigned int reg) -+{ -+ switch (reg) { -+ case BCM2835_CLK_PCMCTL_REG: -+ return true; -+ default: -+ return false; -+ }; -+} -+ -+static const struct regmap_config bcm2835_regmap_config[] = { -+ { -+ .reg_bits = 32, -+ .reg_stride = 4, -+ .val_bits = 32, -+ .max_register = BCM2835_I2S_GRAY_REG, -+ .precious_reg = bcm2835_i2s_precious_reg, -+ .volatile_reg = bcm2835_i2s_volatile_reg, -+ .cache_type = REGCACHE_RBTREE, -+ }, -+ { -+ .reg_bits = 32, -+ .reg_stride = 4, -+ .val_bits = 32, -+ .max_register = BCM2835_CLK_PCMDIV_REG, -+ .volatile_reg = bcm2835_clk_volatile_reg, -+ .cache_type = REGCACHE_RBTREE, -+ }, - }; - - static const struct snd_soc_component_driver bcm2835_i2s_component = { -@@ -623,50 +787,42 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { - static int bcm2835_i2s_probe(struct platform_device *pdev) - { - struct bcm2835_i2s_dev *dev; -+ int i; - int ret; -- struct resource *mem; -- void __iomem *base; -- const __be32 *addr; -- dma_addr_t dma_base; -+ struct regmap *regmap[2]; -+ struct resource *mem[2]; -+ -+ /* Request both ioareas */ -+ for (i = 0; i <= 1; i++) { -+ void __iomem *base; -+ -+ mem[i] = platform_get_resource(pdev, IORESOURCE_MEM, i); -+ base = devm_ioremap_resource(&pdev->dev, mem[i]); -+ if (IS_ERR(base)) -+ return PTR_ERR(base); -+ -+ regmap[i] = devm_regmap_init_mmio(&pdev->dev, base, -+ &bcm2835_regmap_config[i]); -+ if (IS_ERR(regmap[i])) -+ return PTR_ERR(regmap[i]); -+ } - - dev = devm_kzalloc(&pdev->dev, sizeof(*dev), - GFP_KERNEL); - if (!dev) - return -ENOMEM; - -- /* get the clock */ -- dev->clk_prepared = false; -- dev->clk = devm_clk_get(&pdev->dev, NULL); -- if (IS_ERR(dev->clk)) { -- dev_err(&pdev->dev, "could not get clk: %ld\n", -- PTR_ERR(dev->clk)); -- return PTR_ERR(dev->clk); -- } -- -- /* Request ioarea */ -- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- base = devm_ioremap_resource(&pdev->dev, mem); -- if (IS_ERR(base)) -- return PTR_ERR(base); -- -- dev->i2s_regmap = devm_regmap_init_mmio(&pdev->dev, base, -- &bcm2835_regmap_config); -- if (IS_ERR(dev->i2s_regmap)) -- return PTR_ERR(dev->i2s_regmap); -- -- /* Set the DMA address - we have to parse DT ourselves */ -- addr = of_get_address(pdev->dev.of_node, 0, NULL, NULL); -- if (!addr) { -- dev_err(&pdev->dev, "could not get DMA-register address\n"); -- return -EINVAL; -- } -- dma_base = be32_to_cpup(addr); -+ dev->i2s_regmap = regmap[0]; -+ dev->clk_regmap = regmap[1]; - -+ /* Set the DMA address */ - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr = -- dma_base + BCM2835_I2S_FIFO_A_REG; -+ (dma_addr_t)mem[0]->start + BCM2835_I2S_FIFO_A_REG -+ + BCM2835_VCMMU_SHIFT; - - dev->dma_data[SNDRV_PCM_STREAM_CAPTURE].addr = -- dma_base + BCM2835_I2S_FIFO_A_REG; -+ (dma_addr_t)mem[0]->start + BCM2835_I2S_FIFO_A_REG -+ + BCM2835_VCMMU_SHIFT; - - /* Set the bus width */ - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr_width = - -From 9c1654cd3d53621b50ff62b0fe21e42f111246d2 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 16:44:05 +0200 -Subject: [PATCH 089/119] bcm2835-i2s: get base address for DMA from devicetree - -Code copied from spi-bcm2835. Get physical address from devicetree -instead of using hardcoded constant. - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 20 ++++++++++++-------- - 1 file changed, 12 insertions(+), 8 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 3303d5f58082f68b68b535b2bdf7ce8d14cafcc4..0f25db4cd198c0a511e8a205b0cb2be62ba94adf 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -158,10 +159,6 @@ static const unsigned int bcm2835_clk_freq[BCM2835_CLK_SRC_HDMI+1] = { - #define BCM2835_I2S_INT_RXR BIT(1) - #define BCM2835_I2S_INT_TXW BIT(0) - --/* I2S DMA interface */ --/* FIXME: Needs IOMMU support */ --#define BCM2835_VCMMU_SHIFT (0x7E000000 - 0x20000000) -- - /* General device struct */ - struct bcm2835_i2s_dev { - struct device *dev; -@@ -791,6 +788,15 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - int ret; - struct regmap *regmap[2]; - struct resource *mem[2]; -+ const __be32 *addr; -+ dma_addr_t dma_reg_base; -+ -+ addr = of_get_address(pdev->dev.of_node, 0, NULL, NULL); -+ if (!addr) { -+ dev_err(&pdev->dev, "could not get DMA-register address\n"); -+ return -ENODEV; -+ } -+ dma_reg_base = be32_to_cpup(addr); - - /* Request both ioareas */ - for (i = 0; i <= 1; i++) { -@@ -817,12 +823,10 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - - /* Set the DMA address */ - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr = -- (dma_addr_t)mem[0]->start + BCM2835_I2S_FIFO_A_REG -- + BCM2835_VCMMU_SHIFT; -+ dma_reg_base + BCM2835_I2S_FIFO_A_REG; - - dev->dma_data[SNDRV_PCM_STREAM_CAPTURE].addr = -- (dma_addr_t)mem[0]->start + BCM2835_I2S_FIFO_A_REG -- + BCM2835_VCMMU_SHIFT; -+ dma_reg_base + BCM2835_I2S_FIFO_A_REG; - - /* Set the bus width */ - dev->dma_data[SNDRV_PCM_STREAM_PLAYBACK].addr_width = - -From def571fa6c3dc0c46f0bc630696abcb8d928997e Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:21:16 +0200 -Subject: [PATCH 090/119] bcm2835-i2s: add 24bit support, update bclk_ratio to - more correct values - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit 62c05a0b5328d9376d39c9e74da10b8a2465c234 ("ASoC: BCM2708: -Add 24 bit support") - -This adds 24 bit support to the I2S driver of the BCM2708. -Besides enabling the 24 bit flags, it includes two bug fixes: - -MMAP is not supported. Claiming this leads to strange issues -when the format of driver and file do not match. - -The datasheet states that the width extension bit should be set -for widths greater than 24, but greater or equal would be correct. -This follows from the definition of the width field. - -Signed-off-by: Florian Meier - -RPi commit 3e8c672bc4e92d457aa4654bbb4cfd79a18a2327 ("bcm2708-i2s: -Update bclk_ratio to more correct values") - -Discussion about blck_ratio affecting sound quality: -https://github.com/raspberrypi/linux/issues/681 - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 0f25db4cd198c0a511e8a205b0cb2be62ba94adf..0f35d7c0f4026bb50a7223461b907b9797bd9a05 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -340,11 +340,15 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - switch (params_format(params)) { - case SNDRV_PCM_FORMAT_S16_LE: - data_length = 16; -- bclk_ratio = 40; -+ bclk_ratio = 50; -+ break; -+ case SNDRV_PCM_FORMAT_S24_LE: -+ data_length = 24; -+ bclk_ratio = 50; - break; - case SNDRV_PCM_FORMAT_S32_LE: - data_length = 32; -- bclk_ratio = 80; -+ bclk_ratio = 100; - break; - default: - return -EINVAL; -@@ -420,7 +424,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; - -- if (data_length > 24) -+ if (data_length >= 24) - format |= BCM2835_I2S_CHWEX; - - format |= BCM2835_I2S_CHWID((data_length-8)&0xf); -@@ -711,6 +715,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE -+ | SNDRV_PCM_FMTBIT_S24_LE - | SNDRV_PCM_FMTBIT_S32_LE - }, - .capture = { -@@ -718,6 +723,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { - .channels_max = 2, - .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE -+ | SNDRV_PCM_FMTBIT_S24_LE - | SNDRV_PCM_FMTBIT_S32_LE - }, - .ops = &bcm2835_i2s_dai_ops, - -From c80c24f5107b6d4489edc67e7908612ecb713038 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:25:51 +0200 -Subject: [PATCH 091/119] bcm2835-i2s: setup clock only if CPU is clock master - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit c14827ecdaa36607f6110f9ce8df96e698672191 ("bcm2708: Allow -option card devices to be configured via DT") - -Original work by Zoltan Szenczi, committed to RPi tree by -Phil Elwell. - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 28 +++++++++++++++++++--------- - 1 file changed, 19 insertions(+), 9 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 0f35d7c0f4026bb50a7223461b907b9797bd9a05..d5e412302811ed8b007fc53f0aa2b5ddd12774b6 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -411,15 +411,25 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - divf = dividend & BCM2835_CLK_DIVF_MASK; - } - -- /* Set clock divider */ -- regmap_write(dev->clk_regmap, BCM2835_CLK_PCMDIV_REG, BCM2835_CLK_PASSWD -- | BCM2835_CLK_DIVI(divi) -- | BCM2835_CLK_DIVF(divf)); -- -- /* Setup clock, but don't start it yet */ -- regmap_write(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, BCM2835_CLK_PASSWD -- | BCM2835_CLK_MASH(mash) -- | BCM2835_CLK_SRC(clk_src)); -+ /* Clock should only be set up here if CPU is clock master */ -+ switch (dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) { -+ case SND_SOC_DAIFMT_CBS_CFS: -+ case SND_SOC_DAIFMT_CBS_CFM: -+ /* Set clock divider */ -+ regmap_write(dev->clk_regmap, BCM2835_CLK_PCMDIV_REG, -+ BCM2835_CLK_PASSWD -+ | BCM2835_CLK_DIVI(divi) -+ | BCM2835_CLK_DIVF(divf)); -+ -+ /* Setup clock, but don't start it yet */ -+ regmap_write(dev->clk_regmap, BCM2835_CLK_PCMCTL_REG, -+ BCM2835_CLK_PASSWD -+ | BCM2835_CLK_MASH(mash) -+ | BCM2835_CLK_SRC(clk_src)); -+ break; -+ default: -+ break; -+ } - - /* Setup the frame format */ - format = BCM2835_I2S_CHEN; - -From 4274dd24fee0d47cf65592584beffd04370a2945 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:49:51 +0200 -Subject: [PATCH 092/119] bcm2835-i2s: Eliminate debugfs directory error - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit fd7d7a3dbe9262d16971ef81c234ed28c6499dd7 ("bcm2708: -Eliminate i2s debugfs directory error") - -Qualify the two regmap ranges uses by bcm2708-i2s ('-i2s' and '-clk') -to avoid the name clash when registering debugfs entries. - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index d5e412302811ed8b007fc53f0aa2b5ddd12774b6..2d29050e739b0af02d0f5122d18178b61c024bea 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -782,6 +782,7 @@ static const struct regmap_config bcm2835_regmap_config[] = { - .precious_reg = bcm2835_i2s_precious_reg, - .volatile_reg = bcm2835_i2s_volatile_reg, - .cache_type = REGCACHE_RBTREE, -+ .name = "i2s", - }, - { - .reg_bits = 32, -@@ -790,6 +791,7 @@ static const struct regmap_config bcm2835_regmap_config[] = { - .max_register = BCM2835_CLK_PCMDIV_REG, - .volatile_reg = bcm2835_clk_volatile_reg, - .cache_type = REGCACHE_RBTREE, -+ .name = "clk", - }, - }; - - -From 6ecdfdf4adacd4fe80fa448e9e2be6512b628428 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:35:20 +0200 -Subject: [PATCH 093/119] bcm2835-i2s: Register PCM device - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit ba46b4935a23aa2caac1855ead52a035d4776680 ("ASoC: Add -support for BCM2708") - -This driver adds support for digital audio (I2S) -for the BCM2708 SoC that is used by the -Raspberry Pi. External audio codecs can be -connected to the Raspberry Pi via P5 header. - -It relies on cyclic DMA engine support for BCM2708. - -Signed-off-by: Florian Meier - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 2d29050e739b0af02d0f5122d18178b61c024bea..ce93ef0579ab142c788736f0d309c92636b8983d 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -799,6 +799,25 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { - .name = "bcm2835-i2s-comp", - }; - -+static const struct snd_pcm_hardware bcm2835_pcm_hardware = { -+ .info = SNDRV_PCM_INFO_INTERLEAVED | -+ SNDRV_PCM_INFO_JOINT_DUPLEX, -+ .formats = SNDRV_PCM_FMTBIT_S16_LE | -+ SNDRV_PCM_FMTBIT_S24_LE | -+ SNDRV_PCM_FMTBIT_S32_LE, -+ .period_bytes_min = 32, -+ .period_bytes_max = 64 * PAGE_SIZE, -+ .periods_min = 2, -+ .periods_max = 255, -+ .buffer_bytes_max = 128 * PAGE_SIZE, -+}; -+ -+static const struct snd_dmaengine_pcm_config bcm2835_dmaengine_pcm_config = { -+ .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config, -+ .pcm_hardware = &bcm2835_pcm_hardware, -+ .prealloc_buffer_size = 256 * PAGE_SIZE, -+}; -+ - static int bcm2835_i2s_probe(struct platform_device *pdev) - { - struct bcm2835_i2s_dev *dev; -@@ -870,7 +889,9 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - return ret; - } - -- ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); -+ ret = devm_snd_dmaengine_pcm_register(&pdev->dev, -+ &bcm2835_dmaengine_pcm_config, -+ SND_DMAENGINE_PCM_FLAG_COMPAT); - if (ret) { - dev_err(&pdev->dev, "Could not register PCM: %d\n", ret); - return ret; - -From d5213772ae47d7ca423e9a16aa34624f1ec77fda Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Sun, 11 Oct 2015 15:55:21 +0200 -Subject: [PATCH 094/119] bcm2835-i2s: Enable MMAP support via a DT property - -Code ported from bcm2708-i2s driver in Raspberry Pi tree. - -RPi commit 7ee829fd77a30127db5d0b3c7d79b8718166e568 ("bcm2708-i2s: -Enable MMAP support via a DT property and overlay") - -The i2s driver used to claim to support MMAP, but that feature was disabled -when some problems were found. Add the ability to enable this feature -through Device Tree, using the i2s-mmap overlay. - -See: #1004 - -Signed-off-by: Matthias Reichl ---- - sound/soc/bcm/bcm2835-i2s.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index ce93ef0579ab142c788736f0d309c92636b8983d..6f60c2cebb412524bb0e30d0339fe556680e8637 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -799,7 +799,7 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = { - .name = "bcm2835-i2s-comp", - }; - --static const struct snd_pcm_hardware bcm2835_pcm_hardware = { -+static struct snd_pcm_hardware bcm2835_pcm_hardware = { - .info = SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_JOINT_DUPLEX, - .formats = SNDRV_PCM_FMTBIT_S16_LE | -@@ -835,6 +835,11 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) - } - dma_reg_base = be32_to_cpup(addr); - -+ if (of_property_read_bool(pdev->dev.of_node, "brcm,enable-mmap")) -+ bcm2835_pcm_hardware.info |= -+ SNDRV_PCM_INFO_MMAP | -+ SNDRV_PCM_INFO_MMAP_VALID; -+ - /* Request both ioareas */ - for (i = 0; i <= 1; i++) { - void __iomem *base; - -From 71a9af52e8b8ebb7f3eb2bb48d715cc3da47d80e Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Thu, 21 Apr 2016 15:44:14 +0100 -Subject: [PATCH 095/119] bcm2835-i2s: Reduce the TX DREQ threshold - -TX FIFO overrun is thought to be the cause of channel swapping, so -reducing the DREQ threshold seems reasonable and appears to be -effective. - -See: https://github.com/raspberrypi/linux/issues/1417 - -Signed-off-by: Phil Elwell ---- - sound/soc/bcm/bcm2835-i2s.c | 21 ++++++++++++++------- - 1 file changed, 14 insertions(+), 7 deletions(-) - -diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c -index 6f60c2cebb412524bb0e30d0339fe556680e8637..b26f9587dec01d62606df3f47b3ef00c908fa05b 100644 ---- a/sound/soc/bcm/bcm2835-i2s.c -+++ b/sound/soc/bcm/bcm2835-i2s.c -@@ -555,15 +555,22 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, - - /* Setup the DMA parameters */ - regmap_update_bits(dev->i2s_regmap, BCM2835_I2S_CS_A_REG, -- BCM2835_I2S_RXTHR(1) -- | BCM2835_I2S_TXTHR(1) -- | BCM2835_I2S_DMAEN, 0xffffffff); -+ BCM2835_I2S_RXTHR(3) -+ | BCM2835_I2S_TXTHR(3) -+ | BCM2835_I2S_DMAEN, -+ BCM2835_I2S_RXTHR(1) -+ | BCM2835_I2S_TXTHR(1) -+ | BCM2835_I2S_DMAEN); - - regmap_update_bits(dev->i2s_regmap, BCM2835_I2S_DREQ_A_REG, -- BCM2835_I2S_TX_PANIC(0x10) -- | BCM2835_I2S_RX_PANIC(0x30) -- | BCM2835_I2S_TX(0x30) -- | BCM2835_I2S_RX(0x20), 0xffffffff); -+ BCM2835_I2S_TX_PANIC(0x7f) -+ | BCM2835_I2S_RX_PANIC(0x7f) -+ | BCM2835_I2S_TX(0x7f) -+ | BCM2835_I2S_RX(0x7f), -+ BCM2835_I2S_TX_PANIC(0x10) -+ | BCM2835_I2S_RX_PANIC(0x30) -+ | BCM2835_I2S_TX(0x20) -+ | BCM2835_I2S_RX(0x20)); - - /* Clear FIFOs */ - bcm2835_i2s_clear_fifos(dev, true, true); - -From c2da3f61c8bcd26088c49ccc64da5fd09b9225fb Mon Sep 17 00:00:00 2001 +From 2bcac687459aa66aa7d10beb5839180c766cf514 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 096/119] rpi_display: add backlight driver and overlay +Subject: [PATCH 085/147] rpi_display: add backlight driver and overlay Add a mailbox-driven backlight controller for the Raspberry Pi DSI touchscreen display. Requires updated GPU firmware to recognise the @@ -133818,10 +132837,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From a6b20426b48edbef48f39d0d7aeb7cf05e4c8546 Mon Sep 17 00:00:00 2001 +From 4ce4df9188ae128624edc9cfa5b1b9759227b6a1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 097/119] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 086/147] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -133833,10 +132852,10 @@ request that the VPU toggles LEDs. create mode 100644 drivers/gpio/gpio-bcm-virt.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index d7860614f87f532caeb21145c78352d38161b2a3..05ca35a0b2c431c39e1b207f560e1b11f118e6fe 100644 +index 5d457ff613259b5921e96eb1e3fab22bc5dd0d42..3f4fa61d2213c2996e5ac8fb9bbab977ebfbb2ac 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig -@@ -143,6 +143,12 @@ config GPIO_BCM_KONA +@@ -144,6 +144,12 @@ config GPIO_BCM_KONA help Turn on GPIO support for Broadcom "Kona" chips. @@ -134047,10 +133066,10 @@ index 0000000000000000000000000000000000000000..f3e0f1620b979e4fa3c7e556eb785ac2 +MODULE_DESCRIPTION("brcmvirt GPIO driver"); +MODULE_ALIAS("platform:brcmvirt-gpio"); -From 06a331fcab9977b8975daca74240f95f353e8ad3 Mon Sep 17 00:00:00 2001 +From ddf79d660e8d582f6c91c76604d8073b1e8a02a8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 4 Mar 2016 12:49:09 +0000 -Subject: [PATCH 098/119] DRM_VC4: Allow to be built for ARCH_BCM270x +Subject: [PATCH 087/147] DRM_VC4: Allow to be built for ARCH_BCM270x --- drivers/gpu/drm/vc4/Kconfig | 2 +- @@ -134069,10 +133088,10 @@ index e53df59cb139f25f8e6ae916bca93abf0c49e063..f6e938208b73512f20eab46a383ca91b select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER -From 7bb919f581dce128a6fcd28da141aa413e427919 Mon Sep 17 00:00:00 2001 +From a3e6549aff9a6c8670cd7bc405f8d2e9d820e714 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 099/119] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 088/147] amba_pl011: Don't use DT aliases for numbering The pl011 driver looks for DT aliases of the form "serial", and if found uses as the device ID. This can cause @@ -134101,10 +133120,10 @@ index 1b7331e40d795e1ec5482d6a82871bd5ce050b60..a04d27ef682792808301ac2d2bfb67d5 uap->old_cr = 0; uap->port.dev = dev; -From d6484eb31ca7b0298fce4f0ed2a0278e08a94d82 Mon Sep 17 00:00:00 2001 +From 065f196c93edb9f5b0f3264766b92f5f82ce273d Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 100/119] OF: DT-Overlay configfs interface +Subject: [PATCH 089/147] OF: DT-Overlay configfs interface This is a port of Pantelis Antoniou's v3 port that makes use of the new upstreamed configfs support for binary attributes. @@ -134536,10 +133555,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 5c8c09bd604f05bb436f7358360c0aecc48c2143 Mon Sep 17 00:00:00 2001 +From 907ea1dbbfe8226490230d0a8cb998e7bbd6b7c0 Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 101/119] brcm: adds support for BCM43341 wifi +Subject: [PATCH 090/147] brcm: adds support for BCM43341 wifi --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 ++ @@ -134579,10 +133598,10 @@ index 699f2c2782ee9d898a25c95e0c5d45744d0777ff..15598b3687a213d8c00d45965a6b9351 #define BRCM_CC_4335_CHIP_ID 0x4335 #define BRCM_CC_4339_CHIP_ID 0x4339 -From a88ce4432297fbdc7314529e5638b949f8ca7688 Mon Sep 17 00:00:00 2001 +From f181b58bb79caea1d1c2363d889df059973c60fd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 9 Mar 2016 17:25:59 +0000 -Subject: [PATCH 102/119] brcmfmac: Disable power management +Subject: [PATCH 091/147] brcmfmac: Disable power management Disable wireless power saving in the brcmfmac WLAN driver. This is a temporary measure until the connectivity loss resulting from power @@ -134607,10 +133626,10 @@ index 62f475e31077ca1fa1df15863f02ee0911c46997..d001128266f462beee5f9672c64ed2c0 if (!check_vif_up(ifp->vif)) { -From 69772f124d1cb0d31de04c768dc779f2f8b118d6 Mon Sep 17 00:00:00 2001 +From 6010088f05386dacceb66c9763fe43709c497830 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 28 Apr 2016 17:13:47 +0100 -Subject: [PATCH 103/119] brcmfmac: Use original country code as a fallback +Subject: [PATCH 092/147] brcmfmac: Use original country code as a fallback Commit 73345fd212980d2e28a5c6d83801c903bd773680: @@ -134669,10 +133688,10 @@ index d001128266f462beee5f9672c64ed2c0d9200334..90eb79cc104427597046f2459e6f46de ccreq->country_abbrev[1] = alpha2[1]; ccreq->country_abbrev[2] = 0; -From c81a9772926ffe219c9ddb80ed38bd50c2e850aa Mon Sep 17 00:00:00 2001 +From 94fb23bdcbf1b378aef17dd99b0eb98231134e59 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 19 May 2016 15:36:09 +0100 -Subject: [PATCH 104/119] brcmfmac: Plug memory leak in brcmf_fill_bss_param +Subject: [PATCH 093/147] brcmfmac: Plug memory leak in brcmf_fill_bss_param See: https://github.com/raspberrypi/linux/issues/1471 @@ -134705,10 +133724,10 @@ index 90eb79cc104427597046f2459e6f46de09702784..27a59a9f7b9c108e728bdc7fc8d95139 static s32 -From 678e4a71084b991fca8366eda27c572c133e0e0c Mon Sep 17 00:00:00 2001 +From f13b38582b394ff9f9d5d692d67b3b1cfa16af07 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 105/119] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 094/147] hci_h5: Don't send conf_req when ACTIVE Without this patch, a modem and kernel can continuously bombard each other with conf_req and conf_rsp messages, in a demented game of tag. @@ -134731,10 +133750,10 @@ index 0879d64b1caf58afb6e5d494c07d9ab7e7cdf983..5161ab30fd533d50f516bb93d5b9f402 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 070f632477a257c5732b1e2d3239ffbb8a8fd072 Mon Sep 17 00:00:00 2001 +From bd99b18113650a862bae15d942d1030273fdf8c0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 22 Jan 2016 13:06:39 -0800 -Subject: [PATCH 106/119] drm/vc4: Add a debugfs node for tracking execution +Subject: [PATCH 095/147] drm/vc4: Add a debugfs node for tracking execution state. Signed-off-by: Eric Anholt @@ -134794,10 +133813,10 @@ index 46899d6de6753c28c7ca6c721119a28d72792148..cbb1bc0b0db88f1c83ce3a630b2efe67 vc4_queue_hangcheck(struct drm_device *dev) { -From 280b96889f2a3892b44f4f03f56c0a229693a724 Mon Sep 17 00:00:00 2001 +From ac57b182e329a7e0d1735d60731ebb822694cc23 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 25 Jan 2016 13:03:33 -0800 -Subject: [PATCH 107/119] drm/vc4: Include vc4_drm.h in uapi in downstream +Subject: [PATCH 096/147] drm/vc4: Include vc4_drm.h in uapi in downstream build. Signed-off-by: Eric Anholt @@ -134818,10 +133837,10 @@ index 9355dd8eff3ba39401dfe37e7fbf7737f0397f11..68828bf586f05a8d9b0a6ab409ee91a7 header-y += vmwgfx_drm.h header-y += msm_drm.h -From 54527e3981e953cc84e6e11bf99a18a8070c52c3 Mon Sep 17 00:00:00 2001 +From e5029b6e2fca6cc37234361691ac51e7eb94b08f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 30 Mar 2016 17:23:15 +0100 -Subject: [PATCH 108/119] cpufreq: Temporarily ignore io_is_busy=1 +Subject: [PATCH 097/147] cpufreq: Temporarily ignore io_is_busy=1 To speed testing of the new sdhost driver that adapts to changes in core_freq, hack the on-demand governor to treat io_is_busy=1 as @@ -134852,10 +133871,10 @@ index 300163430516766d56b842d8d12dc33175eee66b..9ab7b40005cb7ddfafc3917dc874eea8 /* we need to re-evaluate prev_cpu_idle */ gov_update_cpu_data(dbs_data); -From c48aa30fc6858f37f1bf43538fbea1d9ca102f56 Mon Sep 17 00:00:00 2001 +From 632a36d60fa1de95ab6af836889bb6c6ac55c078 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Oct 2015 11:32:14 -0700 -Subject: [PATCH 109/119] drm/vc4: Force HDMI to connected. +Subject: [PATCH 098/147] drm/vc4: Force HDMI to connected. For some reason on the downstream tree, the HPD GPIO isn't working. @@ -134878,10 +133897,10 @@ index fd2644d231ff867a4409840eba7f8234a4a1faba..ed9c5274d06a215331aee44da1f7214a if (gpio_get_value_cansleep(vc4->hdmi->hpd_gpio) ^ vc4->hdmi->hpd_active_low) -From f6366a4c9cf5245af1f8c10d9c19ad287bb1bf02 Mon Sep 17 00:00:00 2001 +From b2b56335a92130edf9b40cd62bb9c23bcfbc0db3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 19 Apr 2016 15:55:02 -0700 -Subject: [PATCH 110/119] ARM: bcm2708: Enable building power domain driver. +Subject: [PATCH 099/147] ARM: bcm2708: Enable building power domain driver. Signed-off-by: Eric Anholt --- @@ -134901,10 +133920,10 @@ index 3066edea184d765a670ded0cead470597654abc1..e23518142ceac6651641cc30c327d60d select PM_GENERIC_DOMAINS if PM select PM_GENERIC_DOMAINS_OF if PM -From 00541946c0141e5eff08499e6560dbbf8b6bcc7c Mon Sep 17 00:00:00 2001 +From b9baf5ba1e0adb57f7d04aa3ca0ee39c7aa4a9fe Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 111/119] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 100/147] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -134924,10 +133943,10 @@ index f22e060709e547528b29b747f796b45c445d23fa..76b7bd7d9d33a0dcefcdb5fe3e0df4de MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From 510b1c017049ea1d1b27ddef1d2243b4afd48f3e Mon Sep 17 00:00:00 2001 +From 14357f1133ce255f61edfa89245805ee87a54bf6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 112/119] spi-bcm2835: Disable forced software CS +Subject: [PATCH 101/147] spi-bcm2835: Disable forced software CS Select software CS in bcm2708_common.dtsi, and disable the automatic conversion in the driver to allow hardware CS to be re-enabled with an @@ -134961,10 +133980,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From df1eaf37c912a78982c325ff6d1726edc112fe05 Mon Sep 17 00:00:00 2001 +From 3b43c6a2aae0b1f58ff29b98affe4e96125ba470 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 28 Jul 2016 11:39:51 +0100 -Subject: [PATCH 113/119] config: Enable CONFIG_USER_NS +Subject: [PATCH 102/147] config: Enable CONFIG_USER_NS --- arch/arm/configs/bcm2709_defconfig | 2 +- @@ -135004,10 +134023,10 @@ index da2df3d30e15a55a34b45d3ebbf98e906da6379c..6c885f0518d0c015357a6fea1438841d CONFIG_BLK_DEV_INITRD=y CONFIG_EMBEDDED=y -From 6f5c348828f93b34955442c7dea5e9aacf2d1e96 Mon Sep 17 00:00:00 2001 +From 9c8942382f8910b8353b295a81ea943d8018029d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 9 Aug 2016 22:19:28 +0100 -Subject: [PATCH 114/119] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 103/147] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -135038,10 +134057,10 @@ index d22a2324085fbf61fbd8920362bfc7b9f72bebe3..c846c55075387398d9bcb0957e31f5c8 MODULE_PARM_DESC(packetsize, "Override the RX URB packet size"); -From b249cb38f2fe1ef603f8aec92ac3196803a894ce Mon Sep 17 00:00:00 2001 +From b6b81841cfbc8f3db456971abc4898ac1b8792f4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Aug 2016 13:21:32 +0100 -Subject: [PATCH 115/119] smsc95xx: squash: Bump to packetsize=4096 +Subject: [PATCH 104/147] smsc95xx: squash: Bump to packetsize=4096 --- drivers/net/usb/smsc95xx.c | 2 +- @@ -135061,10 +134080,10 @@ index c846c55075387398d9bcb0957e31f5c82fd7d58d..e663cd24653411e502deb28d0ea9b828 MODULE_PARM_DESC(packetsize, "Override the RX URB packet size"); -From 9e1e5a251e0acb18522805009b51acc1cbd0c047 Mon Sep 17 00:00:00 2001 +From 61efd212c2c8f321790755448af227781cab2f7f Mon Sep 17 00:00:00 2001 From: James Adams Date: Fri, 12 Aug 2016 14:35:00 +0100 -Subject: [PATCH 116/119] Add cm3 dts file +Subject: [PATCH 105/147] Add cm3 dts file --- arch/arm/boot/dts/Makefile | 1 + @@ -135267,10 +134286,10 @@ index 0000000000000000000000000000000000000000..6a3d2f21295a63e9211638b9e4ba2027 + }; +}; -From 5dd4fc9c7d2c31973201e48b108fd9c00b9c4820 Mon Sep 17 00:00:00 2001 +From c1d41dda2232bed75e5a2d62b70555d1bc289088 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Aug 2016 17:12:32 +0100 -Subject: [PATCH 117/119] config: Enable SENSORS_LM75 +Subject: [PATCH 106/147] config: Enable SENSORS_LM75 --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -135302,10 +134321,10 @@ index 6c885f0518d0c015357a6fea1438841db344cc46..7f02ad070f3f71c289a5e3d19f5eb682 CONFIG_SENSORS_SHTC1=m CONFIG_THERMAL=y -From 7c6676878e09288ad1aa958fff54f56624fef8f2 Mon Sep 17 00:00:00 2001 +From e87527376dcc111bbf382acbc6673eb0fd8572a2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Aug 2016 17:00:18 +0100 -Subject: [PATCH 118/119] config: Enable SERIAL_SC16IS7XX +Subject: [PATCH 107/147] config: Enable SERIAL_SC16IS7XX --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -135337,10 +134356,10 @@ index 7f02ad070f3f71c289a5e3d19f5eb68253efc8fe..4b50842b84daf91adb553be669737a71 CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y -From 628768a57451cad9149b6794b8ab83da65e1ea1a Mon Sep 17 00:00:00 2001 +From 5bd05abe9a475e10771ccc784b43aac60cfd532b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Aug 2016 15:46:21 +0100 -Subject: [PATCH 119/119] snd-bcm2835: Don't allow responses from VC to be +Subject: [PATCH 108/147] snd-bcm2835: Don't allow responses from VC to be interrupted by user signals There should always be a response, and retry after a signal interruption is not handled, so don't report @@ -135402,3 +134421,2763 @@ index 3de30945d8155b90d244734881a7caa81930fa7c..7ee436ca9fa2903d41d1bdd8f8f07740 __func__, instance->result); ret = -1; + +From 5f3f215791e1665c14498e6313885b1f20d36aec Mon Sep 17 00:00:00 2001 +From: Bruno George de Moraes +Date: Wed, 20 Aug 2014 23:53:57 -0300 +Subject: [PATCH 109/147] snd-bcm2835: Use bcm2835_hw params in preallocate + +--- + sound/arm/bcm2835-pcm.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index d2de13cbd76ed16634f27c0843474825671a28eb..71b128924affac2b7a01d1169e43d437bb1d0c1a 100755 +--- a/sound/arm/bcm2835-pcm.c ++++ b/sound/arm/bcm2835-pcm.c +@@ -518,9 +518,9 @@ int snd_bcm2835_new_pcm(bcm2835_chip_t * chip) + /* pre-allocation of buffers */ + /* NOTE: this may fail */ + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, +- snd_dma_continuous_data +- (GFP_KERNEL), 64 * 1024, +- 64 * 1024); ++ snd_dma_continuous_data (GFP_KERNEL), ++ snd_bcm2835_playback_hw.buffer_bytes_max, snd_bcm2835_playback_hw.buffer_bytes_max); ++ + + out: + mutex_unlock(&chip->audio_mutex); +@@ -550,9 +550,11 @@ int snd_bcm2835_new_spdif_pcm(bcm2835_chip_t * chip) + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, + &snd_bcm2835_playback_spdif_ops); + ++ /* pre-allocation of buffers */ ++ /* NOTE: this may fail */ + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, + snd_dma_continuous_data (GFP_KERNEL), +- 64 * 1024, 64 * 1024); ++ snd_bcm2835_playback_spdif_hw.buffer_bytes_max, snd_bcm2835_playback_spdif_hw.buffer_bytes_max); + out: + mutex_unlock(&chip->audio_mutex); + audio_info(" .. OUT\n"); + +From 521ba4f740bb9a4532d12435a0207dbf94bea9e2 Mon Sep 17 00:00:00 2001 +From: Bruno George de Moraes +Date: Tue, 30 Aug 2016 12:54:38 +0100 +Subject: [PATCH 110/147] dwc_otg: Use kzalloc when suitable + +--- + drivers/usb/host/dwc_otg/dummy_audio.c | 3 +-- + drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/drivers/usb/host/dwc_otg/dummy_audio.c b/drivers/usb/host/dwc_otg/dummy_audio.c +index 225decf765ce825b896ba98771ccb19c20d99404..f827102fa64414d0f6e6ad47948a87fa4ab97e69 100644 +--- a/drivers/usb/host/dwc_otg/dummy_audio.c ++++ b/drivers/usb/host/dwc_otg/dummy_audio.c +@@ -1377,10 +1377,9 @@ zero_bind (struct usb_gadget *gadget) + + + /* ok, we made sense of the hardware ... */ +- dev = kmalloc (sizeof *dev, SLAB_KERNEL); ++ dev = kzalloc (sizeof *dev, SLAB_KERNEL); + if (!dev) + return -ENOMEM; +- memset (dev, 0, sizeof *dev); + spin_lock_init (&dev->lock); + dev->gadget = gadget; + set_gadget_data (gadget, dev); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c +index 0eb0f3572d1230fdd23966c47ba9370d22bb8cb5..5624f32c9ea9117599df451af29fca2e3bca36de 100644 +--- a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c ++++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c +@@ -212,12 +212,11 @@ static struct usb_request *dwc_otg_pcd_alloc_request(struct usb_ep *ep, + DWC_WARN("%s() %s\n", __func__, "Invalid EP!\n"); + return 0; + } +- usb_req = kmalloc(sizeof(*usb_req), gfp_flags); ++ usb_req = kzalloc(sizeof(*usb_req), gfp_flags); + if (0 == usb_req) { + DWC_WARN("%s() %s\n", __func__, "request allocation failed!\n"); + return 0; + } +- memset(usb_req, 0, sizeof(*usb_req)); + usb_req->dma = DWC_DMA_ADDR_INVALID; + + return usb_req; + +From 68ddf2c90b80ac32610bdcc9eabec68b90b563ce Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 26 Apr 2016 11:44:59 -0700 +Subject: [PATCH 111/147] clk: bcm2835: Mark the VPU clock as critical + +The VPU clock is also the clock for our AXI bus, so we really can't +disable it. This might have happened during boot if, for example, +uart1 (aux_uart clock) probed and was then disabled before the other +consumers of the VPU clock had probed. + +v2: Rewrite to use a .flags in bcm2835_clock_data, since other clocks + will need this too. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index 7a7970865c2d856b6b57113c2bb7e8074140a5dd..d9db03cb3fd84163f320dca6f2e533c61f61b5ad 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -443,6 +443,8 @@ struct bcm2835_clock_data { + /* Number of fractional bits in the divider */ + u32 frac_bits; + ++ u32 flags; ++ + bool is_vpu_clock; + bool is_mash_clock; + }; +@@ -1230,7 +1232,7 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + init.parent_names = parents; + init.num_parents = data->num_mux_parents; + init.name = data->name; +- init.flags = CLK_IGNORE_UNUSED; ++ init.flags = data->flags | CLK_IGNORE_UNUSED; + + if (data->is_vpu_clock) { + init.ops = &bcm2835_vpu_clock_clk_ops; +@@ -1649,6 +1651,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_VPUDIV, + .int_bits = 12, + .frac_bits = 8, ++ .flags = CLK_IS_CRITICAL, + .is_vpu_clock = true), + + /* clocks with per parent mux */ + +From 4c4760e3f9153af7fc20817dd0e4990e9dd0b5d5 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Mon, 9 May 2016 17:28:18 -0700 +Subject: [PATCH 112/147] clk: bcm2835: Mark GPIO clocks enabled at boot as + critical. + +These divide off of PLLD_PER and are used for the ethernet and wifi +PHYs source PLLs. Neither of them is currently represented by a phy +device that would grab the clock for us. + +This keeps other drivers from killing the networking PHYs when they +disable their own clocks and trigger PLLD_PER's refcount going to 0. + +v2: Skip marking as critical if they aren't on at boot. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index d9db03cb3fd84163f320dca6f2e533c61f61b5ad..f6bbe8d5929828048114286ec29a33e02519eab8 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1234,6 +1234,15 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman, + init.name = data->name; + init.flags = data->flags | CLK_IGNORE_UNUSED; + ++ /* ++ * Some GPIO clocks for ethernet/wifi PLLs are marked as ++ * critical (since some platforms use them), but if the ++ * firmware didn't have them turned on then they clearly ++ * aren't actually critical. ++ */ ++ if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0) ++ init.flags &= ~CLK_IS_CRITICAL; ++ + if (data->is_vpu_clock) { + init.ops = &bcm2835_vpu_clock_clk_ops; + } else { +@@ -1708,13 +1717,15 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .div_reg = CM_GP1DIV, + .int_bits = 12, + .frac_bits = 12, ++ .flags = CLK_IS_CRITICAL, + .is_mash_clock = true), + [BCM2835_CLOCK_GP2] = REGISTER_PER_CLK( + .name = "gp2", + .ctl_reg = CM_GP2CTL, + .div_reg = CM_GP2DIV, + .int_bits = 12, +- .frac_bits = 12), ++ .frac_bits = 12, ++ .flags = CLK_IS_CRITICAL), + + /* HDMI state machine */ + [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( + +From 079f69c976a3df1d2727691672b125682a743b07 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Tue, 26 Apr 2016 12:39:45 -0700 +Subject: [PATCH 113/147] clk: bcm2835: Skip PLLC clocks when deciding on a new + clock parent + +If the firmware had set up a clock to source from PLLC, go along with +it. But if we're looking for a new parent, we don't want to switch it +to PLLC because the firmware will force PLLC (and thus the AXI bus +clock) to different frequencies during over-temp/under-voltage, +without notification to Linux. + +On my system, this moves the Linux-enabled HDMI state machine and DSI1 +escape clock over to plld_per from pllc_per. EMMC still ends up on +pllc_per, because the firmware had set it up to use that. + +Signed-off-by: Eric Anholt +Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") +--- + drivers/clk/bcm/clk-bcm2835.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index f6bbe8d5929828048114286ec29a33e02519eab8..e527649ee5e32d20cebd762f4badbfca06657a84 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1008,16 +1008,28 @@ static int bcm2835_clock_set_rate(struct clk_hw *hw, + return 0; + } + ++static bool ++bcm2835_clk_is_pllc(struct clk_hw *hw) ++{ ++ if (!hw) ++ return false; ++ ++ return strncmp(clk_hw_get_name(hw), "pllc", 4) == 0; ++} ++ + static int bcm2835_clock_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) + { + struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); + struct clk_hw *parent, *best_parent = NULL; ++ bool current_parent_is_pllc; + unsigned long rate, best_rate = 0; + unsigned long prate, best_prate = 0; + size_t i; + u32 div; + ++ current_parent_is_pllc = bcm2835_clk_is_pllc(clk_hw_get_parent(hw)); ++ + /* + * Select parent clock that results in the closest but lower rate + */ +@@ -1025,6 +1037,17 @@ static int bcm2835_clock_determine_rate(struct clk_hw *hw, + parent = clk_hw_get_parent_by_index(hw, i); + if (!parent) + continue; ++ ++ /* ++ * Don't choose a PLLC-derived clock as our parent ++ * unless it had been manually set that way. PLLC's ++ * frequency gets adjusted by the firmware due to ++ * over-temp or under-voltage conditions, without ++ * prior notification to our clock consumer. ++ */ ++ if (bcm2835_clk_is_pllc(parent) && !current_parent_is_pllc) ++ continue; ++ + prate = clk_hw_get_rate(parent); + div = bcm2835_clock_choose_div(hw, req->rate, prate, true); + rate = bcm2835_clock_rate_from_divisor(clock, prate, div); + +From d84bb6117c42938921f30a7d416671c1fc2ba7f9 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 1 Jun 2016 12:05:35 -0700 +Subject: [PATCH 114/147] clk: bcm2835: Mark the CM SDRAM clock's parent as + critical + +While the SDRAM is being driven by its dedicated PLL most of the time, +there is a little loop running in the firmware that periodically turns +on the CM SDRAM clock (using its pre-initialized parent) and switches +SDRAM to using the CM clock to do PVT recalibration. + +This avoids system hangs if we choose SDRAM's parent for some other +clock, then disable that clock. + +Signed-off-by: Eric Anholt +--- + drivers/clk/bcm/clk-bcm2835.c | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index e527649ee5e32d20cebd762f4badbfca06657a84..fbf616021704178a9d007219a0ea2a9f1704f0a6 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -36,6 +36,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -1827,6 +1828,25 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { + .ctl_reg = CM_PERIICTL), + }; + ++/* ++ * Permanently take a reference on the parent of the SDRAM clock. ++ * ++ * While the SDRAM is being driven by its dedicated PLL most of the ++ * time, there is a little loop running in the firmware that ++ * periodically switches the SDRAM to using our CM clock to do PVT ++ * recalibration, with the assumption that the previously configured ++ * SDRAM parent is still enabled and running. ++ */ ++static int bcm2835_mark_sdc_parent_critical(struct clk *sdc) ++{ ++ struct clk *parent = clk_get_parent(sdc); ++ ++ if (IS_ERR(parent)) ++ return PTR_ERR(parent); ++ ++ return clk_prepare_enable(parent); ++} ++ + static int bcm2835_clk_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; +@@ -1836,6 +1856,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + const struct bcm2835_clk_desc *desc; + const size_t asize = ARRAY_SIZE(clk_desc_array); + size_t i; ++ int ret; + + cprman = devm_kzalloc(dev, + sizeof(*cprman) + asize * sizeof(*clks), +@@ -1866,6 +1887,10 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + clks[i] = desc->clk_register(cprman, desc->data); + } + ++ ret = bcm2835_mark_sdc_parent_critical(clks[BCM2835_CLOCK_SDRAM]); ++ if (ret) ++ return ret; ++ + return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, + &cprman->onecell); + } + +From a9c92046889196e4a7c209a1b7d028eb70f40228 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 25 Apr 2016 06:54:57 +0000 +Subject: [PATCH 115/147] ARM: bcm2708: enable clock manager by default + +Enable the clock manager by default. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 74434b986e3fbb257debfc79caef9fa68f750043..416037450277cd17c280e2b5f9f5423b1cd5502b 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -113,7 +113,6 @@ + * oscillator. + */ + clocks = <&clk_osc>; +- status = "disabled"; + }; + + random: rng@7e104000 { + +From 24ec201f035e0d68e1de98e01255054893da7d33 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Mon, 25 Apr 2016 07:56:13 +0000 +Subject: [PATCH 116/147] ARM: 2708: i2s: removed clock registers and added + clock + +Removed clock registers from reg and added clock to i2s devicetree node. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 416037450277cd17c280e2b5f9f5423b1cd5502b..9af850fc2cacfccd4ec6262992e9248263788dd1 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -159,8 +159,8 @@ + i2s: i2s@7e203000 { + compatible = "brcm,bcm2835-i2s"; + #sound-dai-cells = <0>; +- reg = <0x7e203000 0x24>, +- <0x7e101098 0x08>; ++ reg = <0x7e203000 0x24>; ++ clocks = <&cprman BCM2835_CLOCK_PCM>; + + dmas = <&dma 2>, <&dma 3>; + dma-names = "tx", "rx"; + +From 779b2c1f6af640da2067e648f9148fb56efd5ed0 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 10:31:04 +0000 +Subject: [PATCH 117/147] ARM: bcm2708: use correct device-tree node names for + serial + +Upstream mandates the use of "serial" as name inside the device-tree. +Note that this does not affect the use of the alias - there +uart0 and uart1 are permissible. + +This also fixed the patch references inside the overlays for the rpi3. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 4 ++-- + arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts | 4 ++-- + arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 9af850fc2cacfccd4ec6262992e9248263788dd1..65f83cfd26c016fe5c7438559a8c9e023603268c 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -133,7 +133,7 @@ + #interrupt-cells = <2>; + }; + +- uart0: uart@7e201000 { ++ uart0: serial@7e201000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x7e201000 0x1000>; + interrupts = <2 25>; +@@ -234,7 +234,7 @@ + status = "disabled"; + }; + +- uart1: uart@7e215040 { ++ uart1: serial@7e215040 { + compatible = "brcm,bcm2835-aux-uart", "ns16550"; + reg = <0x7e215040 0x40>; + interrupts = <1 29>; +diff --git a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +index 68f6069dd24cbf6a2ed11365ac0717e36879abe3..87cf345f9641e62c5ed496c238333716cc5b27e6 100644 +--- a/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts +@@ -39,8 +39,8 @@ + fragment@3 { + target-path = "/aliases"; + __overlay__ { +- serial0 = "/soc/uart@7e201000"; +- serial1 = "/soc/uart@7e215040"; ++ serial0 = "/soc/serial@7e201000"; ++ serial1 = "/soc/serial@7e215040"; + }; + }; + }; +diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +index 17d04cf87195a6ff192e1ddbe4f92b1afa9e5ddb..18f77453c38dbbf33f3726a5b4cce15b9f20f390 100644 +--- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts +@@ -57,8 +57,8 @@ + fragment@4 { + target-path = "/aliases"; + __overlay__ { +- serial0 = "/soc/uart@7e201000"; +- serial1 = "/soc/uart@7e215040"; ++ serial0 = "/soc/serial@7e201000"; ++ serial1 = "/soc/serial@7e215040"; + }; + }; + }; + +From 5e863822237919d85b8fe5201fba54d498405055 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 10:52:17 +0000 +Subject: [PATCH 118/147] ARM: bcm2708: moved uart0 to use new clock framework + +Moved uart0 to use new clock framework. +At the same time removed the fixed clock clk_uart0 +and the corresponding references, as the clock is now +read directly from the configured clocks. + +If it ever becomes necessary the following can get added +to modify the base clock rate later: + assigned-clocks = <&clocks BCM2835_CLOCK_UART>; + assigned-clock-rates = ; + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 1 - + arch/arm/boot/dts/bcm2708-rpi-b.dts | 1 - + arch/arm/boot/dts/bcm2708-rpi-cm.dts | 1 - + arch/arm/boot/dts/bcm2708_common.dtsi | 21 +++------------------ + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 - + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 1 - + 6 files changed, 3 insertions(+), 23 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +index db2705afa4e2229c961fe88bcae46233a4ce4542..ddccaee96185418107727fb53a0b12e9007f8347 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +@@ -133,7 +133,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts +index beae0371477cc41f27006ef3f1ef7268839177df..022055b553d87655c17716229884975210159ee7 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts +@@ -127,7 +127,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts +index cd0e1acc22f8ded801f29d331570828e5582247b..d2dcc9c156b32a91a45c26b460fa971abd0dbdf5 100755 +--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts +@@ -88,7 +88,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 65f83cfd26c016fe5c7438559a8c9e023603268c..a93c5a20e3a19a36441f213bf8e9306e90c60842 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -134,10 +134,11 @@ + }; + + uart0: serial@7e201000 { +- compatible = "arm,pl011", "arm,primecell"; ++ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; + reg = <0x7e201000 0x1000>; + interrupts = <2 25>; +- clocks = <&clk_uart0 &clk_apb_p>; ++ clocks = <&cprman BCM2835_CLOCK_UART>, ++ <&cprman BCM2835_CLOCK_VPU>; + clock-names = "uartclk","apb_pclk"; + arm,primecell-periphid = <0x00241011>; // For an explanation, see + // https://github.com/raspberrypi/linux/commit/13731d862cf5219216533a3b0de052cee4cc5038 +@@ -421,22 +422,6 @@ + clock-frequency = <250000000>; + }; + +- clk_uart0: clock@2 { +- compatible = "fixed-clock"; +- reg = <2>; +- #clock-cells = <0>; +- clock-output-names = "uart0_pclk"; +- clock-frequency = <3000000>; +- }; +- +- clk_apb_p: clock@3 { +- compatible = "fixed-clock"; +- reg = <3>; +- #clock-cells = <0>; +- clock-output-names = "apb_pclk"; +- clock-frequency = <126000000>; +- }; +- + clk_pwm: clock@4 { + compatible = "fixed-clock"; + reg = <4>; +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +index eca72bd0d6e891b0096ac97b68c2da92199aa851..8eba22a66d986cf819b10b7d28de959188c27b55 100644 +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +@@ -133,7 +133,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index a72e6e5a0ac0b2492db3d8034a5196b3e19ae008..55ddafda0b17e480e129dc84c93e6743ff533ec1 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -184,7 +184,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; + +From 2d674159f8be281928a10e67ac6f9eb7b037feab Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:12:37 +0000 +Subject: [PATCH 119/147] ARM: bcm2708: move spi0 to use new clock framework + +use spi0 to use new clock framwork + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index a93c5a20e3a19a36441f213bf8e9306e90c60842..2eef648c4da0fe18c7134154a67b1529b36b1eef 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -172,7 +172,7 @@ + compatible = "brcm,bcm2835-spi"; + reg = <0x7e204000 0x1000>; + interrupts = <2 22>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + +From ff37be59358e20ca7569922af6bccb41ef9396db Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:17:32 +0000 +Subject: [PATCH 120/147] ARM: bcm2708: move i2c to use new clock framework + +move i2c to use the new clock framework instead of the fixed clock + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 2eef648c4da0fe18c7134154a67b1529b36b1eef..ac45bbd4e72c2a1668424ee8f714bd9f605eaccd 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -190,7 +190,7 @@ + compatible = "brcm,bcm2708-i2c"; + reg = <0x7e205000 0x1000>; + interrupts = <2 21>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; +@@ -286,7 +286,7 @@ + compatible = "brcm,bcm2708-i2c"; + reg = <0x7e804000 0x1000>; + interrupts = <2 21>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; +@@ -299,7 +299,7 @@ + compatible = "brcm,bcm2708-i2c"; + reg = <0x7e805000 0x1000>; + interrupts = <2 21>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + +From 548f9d93addda4dbbe5668eba8cf4275afe5b4cc Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:19:11 +0000 +Subject: [PATCH 121/147] ARM: bcm2708: move pwm to new clock framework + +Move PWM to use the new clock framework + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index ac45bbd4e72c2a1668424ee8f714bd9f605eaccd..4177be1f2d4404a775fe3e993f020fb573cee7f2 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -222,7 +222,9 @@ + pwm: pwm@7e20c000 { + compatible = "brcm,bcm2835-pwm"; + reg = <0x7e20c000 0x28>; +- clocks = <&clk_pwm>; ++ clocks = <&cprman BCM2835_CLOCK_PWM>; ++ assigned-clocks = <&cprman BCM2835_CLOCK_PWM>; ++ assigned-clock-rates = <10000000>; + #pwm-cells = <2>; + status = "disabled"; + }; + +From 807fd4dd0d41b0047e812d02792584b135a17c23 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:23:53 +0000 +Subject: [PATCH 122/147] ARM: bcm2708: fix auxiliar clock provider to use + clock framework + +Fix the auxiliar clock provider to use the clock framework + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 4177be1f2d4404a775fe3e993f020fb573cee7f2..f1b813d145874205a33068d278c0e79c6355ef20 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -229,12 +229,11 @@ + status = "disabled"; + }; + +- aux: aux@0x7e215004 { ++ aux: aux@0x7e215000 { + compatible = "brcm,bcm2835-aux"; + #clock-cells = <1>; + reg = <0x7e215000 0x8>; +- clocks = <&clk_core>; +- status = "disabled"; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + }; + + uart1: serial@7e215040 { + +From ebbf9fb89d924400a24678ee7cb17ff23e5e74cb Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 11:32:21 +0000 +Subject: [PATCH 123/147] ARM: bcm2708: fix register range of spi-aux + +Fix the register range of the spi-aux devices, +as they do not control the gate. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index f1b813d145874205a33068d278c0e79c6355ef20..37cde9cf317e6c5c76bcf3676a296696f574ac3d 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -248,7 +248,7 @@ + + spi1: spi@7e215080 { + compatible = "brcm,bcm2835-aux-spi"; +- reg = <0x7e215080 0x40>, <0x7e215000 0x8>; ++ reg = <0x7e215080 0x40>; + interrupts = <1 29>; + clocks = <&aux BCM2835_AUX_CLOCK_SPI1>; + #address-cells = <1>; +@@ -258,7 +258,7 @@ + + spi2: spi@7e2150C0 { + compatible = "brcm,bcm2835-aux-spi"; +- reg = <0x7e2150C0 0x40>, <0x7e215000 0x8>; ++ reg = <0x7e2150C0 0x40>; + interrupts = <1 29>; + clocks = <&aux BCM2835_AUX_CLOCK_SPI2>; + #address-cells = <1>; + +From ff1aef56a692c37e844f4b3ba0e7a2a8fa10cde5 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 12:12:16 +0000 +Subject: [PATCH 124/147] ARM: bcm2708: move to new clock manager and driver + for aux-uart + +Move to new aux-uart driver (from upstream) and enable it correctly +in the device tree + +Note that this may also solve the "serial not 115200 baud" +issue on the rpi3... + +With an extension to the driver (requesting clock change +notifications) the driver could change the baud divider when +such a clock change occurs... + +It still would require some communication between the firmware +and the kernel, so that this would get propagated. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 15 ++------------- + arch/arm/configs/bcm2709_defconfig | 3 +++ + arch/arm/configs/bcmrpi_defconfig | 3 +++ + drivers/tty/serial/8250/Kconfig | 2 +- + 4 files changed, 9 insertions(+), 14 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 37cde9cf317e6c5c76bcf3676a296696f574ac3d..011ef9786d46b4ba8db0c672339b7f22b5b75e08 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -237,12 +237,10 @@ + }; + + uart1: serial@7e215040 { +- compatible = "brcm,bcm2835-aux-uart", "ns16550"; ++ compatible = "brcm,bcm2835-aux-uart"; + reg = <0x7e215040 0x40>; + interrupts = <1 29>; +- clocks = <&clk_uart1>; +- reg-shift = <2>; +- no-loopback-test; ++ clocks = <&aux BCM2835_AUX_CLOCK_UART>; + status = "disabled"; + }; + +@@ -431,15 +429,6 @@ + clock-frequency = <100000000>; + }; + +- clk_uart1: clock@5 { +- compatible = "fixed-factor-clock"; +- reg = <5>; +- clocks = <&clk_core>; +- #clock-cells = <0>; +- clock-div = <1>; +- clock-mult = <2>; +- }; +- + /* The oscillator is the root of the clock tree. */ + clk_osc: clock@6 { + compatible = "fixed-clock"; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index e85cf56113b432221816008fcf8453ae57f6933b..76340ce6ccc43a4bb24db414b75814e4a9e10ddc 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -595,6 +595,9 @@ CONFIG_SERIAL_8250_CONSOLE=y + # CONFIG_SERIAL_8250_DMA is not set + CONFIG_SERIAL_8250_NR_UARTS=1 + CONFIG_SERIAL_8250_RUNTIME_UARTS=0 ++CONFIG_SERIAL_8250_EXTENDED=y ++CONFIG_SERIAL_8250_SHARE_IRQ=y ++CONFIG_SERIAL_8250_BCM2835AUX=y + CONFIG_SERIAL_OF_PLATFORM=y + CONFIG_SERIAL_AMBA_PL011=y + CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 4b50842b84daf91adb553be669737a71f6837dc8..5535fee75c1a31c4fe014b1551af763fb2e7c289 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -587,6 +587,9 @@ CONFIG_SERIAL_8250_CONSOLE=y + # CONFIG_SERIAL_8250_DMA is not set + CONFIG_SERIAL_8250_NR_UARTS=1 + CONFIG_SERIAL_8250_RUNTIME_UARTS=0 ++CONFIG_SERIAL_8250_EXTENDED=y ++CONFIG_SERIAL_8250_SHARE_IRQ=y ++CONFIG_SERIAL_8250_BCM2835AUX=y + CONFIG_SERIAL_OF_PLATFORM=y + CONFIG_SERIAL_AMBA_PL011=y + CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig +index e46761d20f7b4c780784d48c9f8de23f47f5134c..1232132f218b5c09dd46f3e9f541ea7c6f34b360 100644 +--- a/drivers/tty/serial/8250/Kconfig ++++ b/drivers/tty/serial/8250/Kconfig +@@ -291,7 +291,7 @@ config SERIAL_8250_ACORN + + config SERIAL_8250_BCM2835AUX + tristate "BCM2835 auxiliar mini UART support" +- depends on ARCH_BCM2835 || COMPILE_TEST ++ depends on ARCH_BCM2708 || ARCH_BCM2709 || ARCH_BCM2835 || COMPILE_TEST + depends on SERIAL_8250 && SERIAL_8250_SHARE_IRQ + help + Support for the BCM2835 auxiliar mini UART. + +From 53718da25dc6278a2c002de3583e7f0801f11b01 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 12:44:22 +0000 +Subject: [PATCH 125/147] ARM: bcm2708: remove pwm clock + +Remove no longer necessary fixed pwm clock. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 011ef9786d46b4ba8db0c672339b7f22b5b75e08..aa6005c2460df08cf2f102148be251a7a57d0bdf 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -421,14 +421,6 @@ + clock-frequency = <250000000>; + }; + +- clk_pwm: clock@4 { +- compatible = "fixed-clock"; +- reg = <4>; +- #clock-cells = <0>; +- clock-output-names = "pwm"; +- clock-frequency = <100000000>; +- }; +- + /* The oscillator is the root of the clock tree. */ + clk_osc: clock@6 { + compatible = "fixed-clock"; + +From a1289638abab86e2a0a6e4454ce5dab89d9974ed Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 14:59:21 +0000 +Subject: [PATCH 126/147] MISC: bcm2835: smi: use clock manager and fix reload + issues + +Use clock manager instead of self-made clockmanager. + +Also fix some error paths that showd up during development +(especially missing release of dma resources on rmmod) + +Signed-off-by: Martin Sperl +--- + drivers/misc/bcm2835_smi.c | 86 +++++++++++++++------------------------------- + 1 file changed, 28 insertions(+), 58 deletions(-) + +diff --git a/drivers/misc/bcm2835_smi.c b/drivers/misc/bcm2835_smi.c +index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e50d3fbec2 100644 +--- a/drivers/misc/bcm2835_smi.c ++++ b/drivers/misc/bcm2835_smi.c +@@ -34,6 +34,7 @@ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#include + #include + #include + #include +@@ -62,7 +63,7 @@ + struct bcm2835_smi_instance { + struct device *dev; + struct smi_settings settings; +- __iomem void *smi_regs_ptr, *cm_smi_regs_ptr; ++ __iomem void *smi_regs_ptr; + dma_addr_t smi_regs_busaddr; + + struct dma_chan *dma_chan; +@@ -72,8 +73,7 @@ struct bcm2835_smi_instance { + + struct scatterlist buffer_sgl; + +- int clock_source; +- int clock_divisor; ++ struct clk *clk; + + /* Sometimes we are called into in an atomic context (e.g. by + JFFS2 + MTD) so we can't use a mutex */ +@@ -82,42 +82,6 @@ struct bcm2835_smi_instance { + + /**************************************************************************** + * +-* SMI clock manager setup +-* +-***************************************************************************/ +- +-static inline void write_smi_cm_reg(struct bcm2835_smi_instance *inst, +- u32 val, unsigned reg) +-{ +- writel(CM_PWD | val, inst->cm_smi_regs_ptr + reg); +-} +- +-static inline u32 read_smi_cm_reg(struct bcm2835_smi_instance *inst, +- unsigned reg) +-{ +- return readl(inst->cm_smi_regs_ptr + reg); +-} +- +-static void smi_setup_clock(struct bcm2835_smi_instance *inst) +-{ +- dev_dbg(inst->dev, "Setting up clock..."); +- /* Disable SMI clock and wait for it to stop. */ +- write_smi_cm_reg(inst, 0, CM_SMI_CTL); +- while (read_smi_cm_reg(inst, CM_SMI_CTL) & CM_SMI_CTL_BUSY) +- ; +- +- write_smi_cm_reg(inst, (inst->clock_divisor << CM_SMI_DIV_DIVI_OFFS), +- CM_SMI_DIV); +- write_smi_cm_reg(inst, (inst->clock_source << CM_SMI_CTL_SRC_OFFS), +- CM_SMI_CTL); +- +- /* Enable the clock */ +- write_smi_cm_reg(inst, (inst->clock_source << CM_SMI_CTL_SRC_OFFS) | +- CM_SMI_CTL_ENAB, CM_SMI_CTL); +-} +- +-/**************************************************************************** +-* + * SMI peripheral setup + * + ***************************************************************************/ +@@ -894,42 +858,40 @@ static int bcm2835_smi_probe(struct platform_device *pdev) + struct device_node *node = dev->of_node; + struct resource *ioresource; + struct bcm2835_smi_instance *inst; ++ const __be32 *addr; + ++ /* We require device tree support */ ++ if (!node) ++ return -EINVAL; + /* Allocate buffers and instance data */ +- + inst = devm_kzalloc(dev, sizeof(struct bcm2835_smi_instance), + GFP_KERNEL); +- + if (!inst) + return -ENOMEM; + + inst->dev = dev; + spin_lock_init(&inst->transaction_lock); + +- /* We require device tree support */ +- if (!node) +- return -EINVAL; +- + ioresource = platform_get_resource(pdev, IORESOURCE_MEM, 0); + inst->smi_regs_ptr = devm_ioremap_resource(dev, ioresource); +- ioresource = platform_get_resource(pdev, IORESOURCE_MEM, 1); +- inst->cm_smi_regs_ptr = devm_ioremap_resource(dev, ioresource); +- inst->smi_regs_busaddr = be32_to_cpu( +- *of_get_address(node, 0, NULL, NULL)); +- of_property_read_u32(node, +- "brcm,smi-clock-source", +- &inst->clock_source); +- of_property_read_u32(node, +- "brcm,smi-clock-divisor", +- &inst->clock_divisor); ++ if (IS_ERR(inst->smi_regs_ptr)) { ++ err = PTR_ERR(inst->smi_regs_ptr); ++ goto err; ++ } ++ addr = of_get_address(node, 0, NULL, NULL); ++ inst->smi_regs_busaddr = be32_to_cpu(addr); + + err = bcm2835_smi_dma_setup(inst); + if (err) +- return err; ++ goto err; + +- /* Finally, do peripheral setup */ ++ /* request clock */ ++ inst->clk = devm_clk_get(dev, NULL); ++ if (!inst->clk) ++ goto err; ++ clk_prepare_enable(inst->clk); + +- smi_setup_clock(inst); ++ /* Finally, do peripheral setup */ + smi_setup_regs(inst); + + platform_set_drvdata(pdev, inst); +@@ -937,6 +899,9 @@ static int bcm2835_smi_probe(struct platform_device *pdev) + dev_info(inst->dev, "initialised"); + + return 0; ++err: ++ kfree(inst); ++ return err; + } + + /**************************************************************************** +@@ -950,6 +915,11 @@ static int bcm2835_smi_remove(struct platform_device *pdev) + struct bcm2835_smi_instance *inst = platform_get_drvdata(pdev); + struct device *dev = inst->dev; + ++ dmaengine_terminate_all(inst->dma_chan); ++ dma_release_channel(inst->dma_chan); ++ ++ clk_disable_unprepare(inst->clk); ++ + dev_info(dev, "SMI device removed - OK"); + return 0; + } + +From e748d263338f572b6121a169920e4cfc7eff3bfa Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 15:02:23 +0000 +Subject: [PATCH 127/147] ARM: bcm2835: move smi to use clock framework + +Move smi to use clock framework. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index aa6005c2460df08cf2f102148be251a7a57d0bdf..d757ca03a4a35f5da464667b6897a654a69ca0b8 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -306,10 +306,11 @@ + + smi: smi@7e600000 { + compatible = "brcm,bcm2835-smi"; +- reg = <0x7e600000 0x44>, <0x7e1010b0 0x8>; ++ reg = <0x7e600000 0x100>; + interrupts = <2 16>; +- brcm,smi-clock-source = <6>; +- brcm,smi-clock-divisor = <4>; ++ clocks = <&cprman BCM2835_CLOCK_SMI>; ++ assigned-clocks = <&cprman BCM2835_CLOCK_SMI>; ++ assigned-clock-rates = <125000000>; + dmas = <&dma 4>; + dma-names = "rx-tx"; + status = "disabled"; + +From d052cbb7659d7344a9e62bd9288c943a0841e5bc Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 13:04:12 +0000 +Subject: [PATCH 128/147] ARM: bcm2708: move mmc to use clock framework + +Move mmc to use clock framework. + +For some reason the emmc clock dirver does not claim the +clock - enable count stays at 0 for the emmc clock. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index d757ca03a4a35f5da464667b6897a654a69ca0b8..9689b971debfb2368da9f56cac2a4e04a1c6dd17 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -268,7 +268,7 @@ + compatible = "brcm,bcm2835-mmc"; + reg = <0x7e300000 0x100>; + interrupts = <2 30>; +- clocks = <&clk_mmc>; ++ clocks = <&cprman BCM2835_CLOCK_EMMC>; + dmas = <&dma 11>; + dma-names = "rx-tx"; + brcm,overclock-50 = <0>; +@@ -414,14 +414,6 @@ + clock-frequency = <250000000>; + }; + +- clk_mmc: clock@1 { +- compatible = "fixed-clock"; +- reg = <1>; +- #clock-cells = <0>; +- clock-output-names = "mmc"; +- clock-frequency = <250000000>; +- }; +- + /* The oscillator is the root of the clock tree. */ + clk_osc: clock@6 { + compatible = "fixed-clock"; + +From ccfa547a1b786cb56caae1ffc9355b5abe9479c7 Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 13:19:51 +0000 +Subject: [PATCH 129/147] ARM: bcm2708: move sdhost to use clock framework + +Move the sdhost device to use the clock framework. + +Unfortunately I can not test it on my CM, as it seem as if +there is no overlay that would enable sdhost and change the +gpio-mux to the correct ALT0 (from Alt3 from mmc). + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708_common.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 9689b971debfb2368da9f56cac2a4e04a1c6dd17..74b8b67dbc73ddd6fa36b3ae6df96c29dc5e27b0 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -149,7 +149,7 @@ + compatible = "brcm,bcm2835-sdhost"; + reg = <0x7e202000 0x100>; + interrupts = <2 24>; +- clocks = <&clk_core>; ++ clocks = <&cprman BCM2835_CLOCK_VPU>; + dmas = <&dma 13>; + dma-names = "rx-tx"; + brcm,overclock-50 = <0>; + +From 1b5a2538f7571f2b466a33e3c454fb2bdeb8c1cf Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Tue, 26 Apr 2016 15:11:24 +0000 +Subject: [PATCH 130/147] ARM: bcm2708: remove clk_core as it is no longer used + +Remove clk_core from device tree as it is no longer used. +Any "modification" to the core_clock in the bootloader is now +automatically detected via the cnew clockmgr. + +Signed-off-by: Martin Sperl +--- + arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 1 - + arch/arm/boot/dts/bcm2708-rpi-b.dts | 1 - + arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 2 -- + arch/arm/boot/dts/bcm2708_common.dtsi | 8 -------- + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 1 - + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 1 - + 6 files changed, 14 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +index ddccaee96185418107727fb53a0b12e9007f8347..6c16c325cd2887a42c42665273834618c1937918 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +@@ -142,7 +142,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts +index 022055b553d87655c17716229884975210159ee7..7c132437671d43e76445a4bf1184cc9a316b0965 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts +@@ -136,7 +136,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; +diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +index 90e330d1978da8624c042d52a38aa5d6d95d2377..f07609d97225b355dd2b6981d4f1fa28d0d40950 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi ++++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +@@ -38,8 +38,6 @@ + + / { + __overrides__ { +- core_freq = <&clk_core>,"clock-frequency:0"; +- + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; + act_led_trigger = <&act_led>,"linux,default-trigger"; +diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi +index 74b8b67dbc73ddd6fa36b3ae6df96c29dc5e27b0..7df436bea6cbdca226e75c687c1518114ae49c7d 100644 +--- a/arch/arm/boot/dts/bcm2708_common.dtsi ++++ b/arch/arm/boot/dts/bcm2708_common.dtsi +@@ -406,14 +406,6 @@ + #address-cells = <1>; + #size-cells = <0>; + +- clk_core: clock@0 { +- compatible = "fixed-clock"; +- reg = <0>; +- #clock-cells = <0>; +- clock-output-names = "core"; +- clock-frequency = <250000000>; +- }; +- + /* The oscillator is the root of the clock tree. */ + clk_osc: clock@6 { + compatible = "fixed-clock"; +diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +index 8eba22a66d986cf819b10b7d28de959188c27b55..74fe4cc1d667e9508ca860bcc8c837fed0cbb855 100644 +--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ++++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +@@ -142,7 +142,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 55ddafda0b17e480e129dc84c93e6743ff533ec1..037ed41b140c448940c4a04d235fa6e6898265d3 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -193,7 +193,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; + +From 26c97e35ac46e2738ca4c8b92efdd77ce5215ed2 Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Tue, 16 Aug 2016 20:07:38 +0100 +Subject: [PATCH 131/147] CM3: ARM: bcm2708: moved uart0 to use new clock + framework + +Moved uart0 to use new clock framework. +At the same time removed the fixed clock clk_uart0 +and the corresponding references, as the clock is now +read directly from the configured clocks. + +If it ever becomes necessary the following can get added +to modify the base clock rate later: + assigned-clocks = <&clocks BCM2835_CLOCK_UART>; + assigned-clock-rates = ; + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +index 6a3d2f21295a63e9211638b9e4ba202753c8181b..f637da1d3b85dfc79e88b4bf0b3ec12417ba2c21 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +@@ -149,7 +149,6 @@ + / { + __overrides__ { + uart0 = <&uart0>,"status"; +- uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; + uart1 = <&uart1>,"status"; + i2s = <&i2s>,"status"; + spi = <&spi0>,"status"; + +From a563f77c9b60043a9037e3023564a6ae1f29619e Mon Sep 17 00:00:00 2001 +From: DigitalDreamtime +Date: Tue, 16 Aug 2016 20:09:33 +0100 +Subject: [PATCH 132/147] CM3: ARM: bcm2708: remove clk_core as it is no longer + used + +Remove clk_core from device tree as it is no longer used. +Any "modification" to the core_clock in the bootloader is now +automatically detected via the cnew clockmgr. + +Signed-off-by: DigitalDreamtime +--- + arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +index f637da1d3b85dfc79e88b4bf0b3ec12417ba2c21..a5d57893d5799e57ffe9b8efe553a03ec4bde007 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +@@ -158,7 +158,6 @@ + i2c0_baudrate = <&i2c0>,"clock-frequency:0"; + i2c1_baudrate = <&i2c1>,"clock-frequency:0"; + i2c2_baudrate = <&i2c2>,"clock-frequency:0"; +- core_freq = <&clk_core>,"clock-frequency:0"; + + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; + +From 113cddf45655ac1febfb23efd06b2f8594ef096a Mon Sep 17 00:00:00 2001 +From: Martin Sperl +Date: Fri, 2 Sep 2016 16:45:27 +0100 +Subject: [PATCH 133/147] Register the clocks early during the boot process, so + that special/critical clocks can get enabled early on in the boot process + avoiding the risk of disabling a clock, pll_divider or pll when a claiming + driver fails to install propperly - maybe it needs to defer. + +Signed-off-by: Martin Sperl +--- + drivers/clk/bcm/clk-bcm2835.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c +index fbf616021704178a9d007219a0ea2a9f1704f0a6..cbbc8d4ddcffc797268c0ecb6477005fa14e228b 100644 +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -1891,8 +1891,15 @@ static int bcm2835_clk_probe(struct platform_device *pdev) + if (ret) + return ret; + +- return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, +- &cprman->onecell); ++ ret = of_clk_add_provider(dev->of_node, of_clk_src_onecell_get, ++ &cprman->onecell); ++ if (ret) ++ return ret; ++ ++ /* note that we have registered all the clocks */ ++ dev_dbg(dev, "registered %d clocks\n", asize); ++ ++ return 0; + } + + static const struct of_device_id bcm2835_clk_of_match[] = { +@@ -1909,7 +1916,11 @@ static struct platform_driver bcm2835_clk_driver = { + .probe = bcm2835_clk_probe, + }; + +-builtin_platform_driver(bcm2835_clk_driver); ++static int __init __bcm2835_clk_driver_init(void) ++{ ++ return platform_driver_register(&bcm2835_clk_driver); ++} ++core_initcall(__bcm2835_clk_driver_init); + + MODULE_AUTHOR("Eric Anholt "); + MODULE_DESCRIPTION("BCM2835 clock driver"); + +From da8df2aa3e4b115de0ae0575e7c5d7a586719464 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 24 May 2016 17:19:27 +0100 +Subject: [PATCH 134/147] brcmfmac: revise SDIO error message in + brcmf_sdio_drivestrengthinit + +The error message is given for something that is not an error here as +the drive strength configuration may not be applicable for specific +devices. Therefore the error message is rephrased and changed to a +debug message. + +[ Patch from Broadcom ] + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +index ea66454a3d7444f51827964aea01bf7573f2b473..f315428e4f696b4c53af4f5f9cbc30512097af36 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +@@ -3668,7 +3668,7 @@ brcmf_sdio_drivestrengthinit(struct brcmf_sdio_dev *sdiodev, + str_shift = 11; + break; + default: +- brcmf_err("No SDIO Drive strength init done for chip %s rev %d pmurev %d\n", ++ brcmf_dbg(INFO, "No SDIO driver strength init needed for chip %s rev %d pmurev %d\n", + ci->name, ci->chiprev, ci->pmurev); + break; + } + +From 2d0dc10d92394a8c83f32ec21f15635ac903c9ea Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 24 May 2016 17:26:31 +0100 +Subject: [PATCH 135/147] brcmfmac: use ndev->needed_headroom to reserve + additional header space + +When using nmap tool with FMAC, the nmap packets were be dropped by kernel +because the size was too short. The kernel message showed like +"nmap: packet size is too short (42 <= 50)". It is caused by the packet +length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE() +and hard_header_len definition, we should use hard_header_len to reserve L2 +header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for +the additional headroom needed by hardware. + +[ Patch from Broadcom ] + +See: https://github.com/raspberrypi/linux/issues/1357 + +Signed-off-by: Phil Elwell +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +index b590499f6883294525b094cb66c4449069eb2353..6570dba08bb482bbb3d47ff6f0790a7004b5e547 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +@@ -516,7 +516,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked) + /* set appropriate operations */ + ndev->netdev_ops = &brcmf_netdev_ops_pri; + +- ndev->hard_header_len += drvr->hdrlen; ++ ndev->needed_headroom += drvr->hdrlen; + ndev->ethtool_ops = &brcmf_ethtool_ops; + + drvr->rxsz = ndev->mtu + ndev->hard_header_len + + +From 99d4ec2690f17f47e5fd0dacb93153416d3a38ed Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 6 Jun 2016 11:11:33 +0100 +Subject: [PATCH 136/147] brcmfmac: change rx_seq check log from error print to + debug print + +The bus rx sequence is not in order because that control and event +frames always cause immediate send, but data frames may be held +for glomming in firmware side. It is not actually an error as the +packets are still processed even if the RX sequence is not in order. +Therefore the error message is rephrased and changed to a debug +message. + +[ Patch from Broadcom ] + +See: https://github.com/raspberrypi/linux/issues/1313 +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +index f315428e4f696b4c53af4f5f9cbc30512097af36..8d716401af46cc9ade8daee2d1b6a17c34e8b680 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +@@ -1386,8 +1386,7 @@ static int brcmf_sdio_hdparse(struct brcmf_sdio *bus, u8 *header, + return -ENXIO; + } + if (rd->seq_num != rx_seq) { +- brcmf_err("seq %d: sequence number error, expect %d\n", +- rx_seq, rd->seq_num); ++ brcmf_dbg(SDIO, "seq %d, expected %d\n", rx_seq, rd->seq_num); + bus->sdcnt.rx_badseq++; + rd->seq_num = rx_seq; + } + +From 92e58f330c22adc0a1fa5d9a600879ae9b3c8481 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 19 Aug 2016 11:26:57 +0100 +Subject: [PATCH 137/147] overlays: Add audremap overlay + +The audremap overlay switches the PWM audio outputs to GPIO pins +12 (L) and 13 (R). +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 ++++++ + arch/arm/boot/dts/overlays/audremap-overlay.dts | 14 ++++++++++++++ + 3 files changed, 21 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/audremap-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 68832129f46b9c8320d0d2634c780bdb330314c9..817c3a67fb397c7b6ec5fdeda1cbb3d60855d2d3 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -18,6 +18,7 @@ dtbo-$(RPI_DT_OVERLAYS) += ads7846.dtbo + dtbo-$(RPI_DT_OVERLAYS) += akkordion-iqdacplus.dtbo + dtbo-$(RPI_DT_OVERLAYS) += at86rf233.dtbo + dtbo-$(RPI_DT_OVERLAYS) += audioinjector-wm8731-audio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += audremap.dtbo + dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo + dtbo-$(RPI_DT_OVERLAYS) += dionaudio-loco.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index b32bca8ada3b10aa40a5c718a1823e1fa4f7f5b2..53b2fa926d6e0fe3aead1150bd7a41ef6f0959c0 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -253,6 +253,12 @@ Load: dtoverlay=audioinjector-wm8731-audio + Params: + + ++Name: audremap ++Info: Switches PWM sound output to pins 12 & 13 ++Load: dtoverlay=audremap ++Params: ++ ++ + Name: bmp085_i2c-sensor + Info: Configures the BMP085/BMP180 digital barometric pressure and temperature + sensors from Bosch Sensortec +diff --git a/arch/arm/boot/dts/overlays/audremap-overlay.dts b/arch/arm/boot/dts/overlays/audremap-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..17bbabb712b1c5768f6446bd8cc3b6687ef24cb8 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts +@@ -0,0 +1,14 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&audio_pins>; ++ __overlay__ { ++ brcm,pins = < 12 13 >; ++ brcm,function = < 4 >; /* alt0 alt0 */ ++ }; ++ }; ++}; + +From 8757278b3baaabc3f1c97bdde26272076823dcaf Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 19 Aug 2016 15:39:01 +0100 +Subject: [PATCH 138/147] overlays: Add swap_lr and enable_jack to audremap + +swap_lr causes the channels to be reversed, and enable_jack prevents the +headphone output from being disabled. + +See: https://github.com/raspberrypi/linux/issues/1473 +--- + arch/arm/boot/dts/overlays/README | 9 ++++++--- + arch/arm/boot/dts/overlays/audremap-overlay.dts | 7 ++++++- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 53b2fa926d6e0fe3aead1150bd7a41ef6f0959c0..f1734321e930978c268615d6f6d356237d0c9d3a 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -254,9 +254,12 @@ Params: + + + Name: audremap +-Info: Switches PWM sound output to pins 12 & 13 +-Load: dtoverlay=audremap +-Params: ++Info: Switches PWM sound output to pins 12 (Right) & 13 (Left) ++Load: dtoverlay=audremap,= ++Params: swap_lr Reverse the channel allocation, which will also ++ swap the audio jack outputs (default off) ++ enable_jack Don't switch off the audio jack output ++ (default off) + + + Name: bmp085_i2c-sensor +diff --git a/arch/arm/boot/dts/overlays/audremap-overlay.dts b/arch/arm/boot/dts/overlays/audremap-overlay.dts +index 17bbabb712b1c5768f6446bd8cc3b6687ef24cb8..9582d6ab31218b4ed7b1d42a9190ca6efe9bd531 100644 +--- a/arch/arm/boot/dts/overlays/audremap-overlay.dts ++++ b/arch/arm/boot/dts/overlays/audremap-overlay.dts +@@ -6,9 +6,14 @@ + + fragment@0 { + target = <&audio_pins>; +- __overlay__ { ++ frag0: __overlay__ { + brcm,pins = < 12 13 >; + brcm,function = < 4 >; /* alt0 alt0 */ + }; + }; ++ ++ __overrides__ { ++ swap_lr = <&frag0>, "swap_lr?"; ++ enable_jack = <&frag0>, "enable_jack?"; ++ }; + }; + +From 675ca8a0f919b7e0d1babf202617c8737affa9ca Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 19 Aug 2016 11:12:28 +0100 +Subject: [PATCH 139/147] BCM270X_DT: Add audio_pins to CM dtb + +Bring the CM .dtb in line with other others. +--- + arch/arm/boot/dts/bcm2708-rpi-cm.dts | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts +index d2dcc9c156b32a91a45c26b460fa971abd0dbdf5..ce9f54ff7e4ce76ad25ad0a19cf2ad48ba9df01a 100755 +--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts ++++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts +@@ -35,6 +35,11 @@ + brcm,pins = <18 19 20 21>; + brcm,function = <4>; /* alt0 */ + }; ++ ++ audio_pins: audio_pins { ++ brcm,pins; ++ brcm,function; ++ }; + }; + + &spi0 { + +From 74717820e2e79a7ae10b38277a00472914e87c02 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 19 Aug 2016 11:19:02 +0100 +Subject: [PATCH 140/147] BCM270X_DT: Don't enable UART0 in CM3 dtb + +--- + arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +index a5d57893d5799e57ffe9b8efe553a03ec4bde007..20388084b98cf942529eb60c55dc540cfea71886 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +@@ -40,12 +40,6 @@ + brcm,function = <4>; /* alt0 */ + }; + +- uart0_pins: uart0_pins { +- brcm,pins; +- brcm,function; +- brcm,pull = <0 2>; +- }; +- + audio_pins: audio_pins { + brcm,pins; + brcm,function; +@@ -75,12 +69,6 @@ + status = "okay"; + }; + +-&uart0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins>; +- status = "okay"; +-}; +- + &spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins &spi0_cs_pins>; + +From 9f28958e2495666619e48b9dd8b290416e503349 Mon Sep 17 00:00:00 2001 +From: wavelet2 +Date: Fri, 19 Aug 2016 09:32:53 +0100 +Subject: [PATCH 141/147] Overlay for Microchip MCP23S08/17 SPI gpio expanders + (#1566) + +Added Overlay for Microchip MCP23S08/17 SPI gpio expanders +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 24 + + arch/arm/boot/dts/overlays/mcp23s17-overlay.dts | 732 ++++++++++++++++++++++++ + 3 files changed, 757 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/mcp23s17-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 817c3a67fb397c7b6ec5fdeda1cbb3d60855d2d3..dc72052757ae5c79d7f196c900d9c0f13ab97a42 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -49,6 +49,7 @@ dtbo-$(RPI_DT_OVERLAYS) += justboom-dac.dtbo + dtbo-$(RPI_DT_OVERLAYS) += justboom-digi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += lirc-rpi.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp23017.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += mcp23s17.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can0.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mcp2515-can1.dtbo + dtbo-$(RPI_DT_OVERLAYS) += mmc.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index f1734321e930978c268615d6f6d356237d0c9d3a..87042af8550e5d16069a42329e34227a21e4b932 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -631,6 +631,30 @@ Params: gpiopin Gpio pin connected to the INTA output of the + addr I2C address of the MCP23017 (default: 0x20) + + ++Name: mcp23s17 ++Info: Configures the MCP23S08/17 SPI GPIO expanders. ++ If devices are present on SPI1 or SPI2, those interfaces must be enabled ++ with one of the spi1-1/2/3cs and/or spi2-1/2/3cs overlays. ++ If interrupts are enabled for a device on a given CS# on a SPI bus, that ++ device must be the only one present on that SPI bus/CS#. ++Load: dtoverlay=mcp23s17,= ++Params: s08-spi--present 4-bit integer, bitmap indicating MCP23S08 ++ devices present on SPI, CS# ++ ++ s17-spi--present 8-bit integer, bitmap indicating MCP23S17 ++ devices present on SPI, CS# ++ ++ s08-spi--int-gpio integer, enables interrupts on a single ++ MCP23S08 device on SPI, CS#, specifies ++ the GPIO pin to which INT output of MCP23S08 ++ is connected. ++ ++ s17-spi--int-gpio integer, enables mirrored interrupts on a ++ single MCP23S17 device on SPI, CS#, ++ specifies the GPIO pin to which either INTA ++ or INTB output of MCP23S17 is connected. ++ ++ + Name: mcp2515-can0 + Info: Configures the MCP2515 CAN controller on spi0.0 + Load: dtoverlay=mcp2515-can0,= +diff --git a/arch/arm/boot/dts/overlays/mcp23s17-overlay.dts b/arch/arm/boot/dts/overlays/mcp23s17-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..7dcbacb3cd007eb15b2b0f165fd8adc7a7b7c580 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/mcp23s17-overlay.dts +@@ -0,0 +1,732 @@ ++// Overlay for MCP23S08/17 GPIO Extenders from Microchip Semiconductor ++ ++// dtparams: ++// s08-spi--present - 4-bit integer, bitmap indicating MCP23S08 devices present on SPI, CS#. ++// s17-spi--present - 8-bit integer, bitmap indicating MCP23S17 devices present on SPI, CS#. ++// s08-spi--int-gpio - integer, enables interrupts on a single MCP23S08 device on SPI, CS#, specifies the GPIO pin to which INT output is connected. ++// s17-spi--int-gpio - integer, enables mirrored interrupts on a single MCP23S17 device on SPI, CS#, specifies the GPIO pin to which either INTA or INTB output is connected. ++// ++// If devices are present on SPI1 or SPI2, those interfaces must be enabled with one of the spi1-1/2/3cs and/or spi2-1/2/3cs overlays. ++// If interrupts are enabled for a device on a given CS# on a SPI bus, that device must be the only one present on that SPI bus/CS#. ++// ++// Example 1: A single MCP23S17 device on SPI0, CS#0 with its SPI addr set to 0 and INTA output connected to GPIO25: ++// dtoverlay=mcp23s17:s17-spi0-0-present=1,s17-spi0-0-int-gpio=25 ++// ++// Example 2: Two MCP23S08 devices on SPI1, CS#0 with their addrs set to 2 and 3. Three MCP23S17 devices on SPI1, CS#1 with their addrs set to 0, 1 and 7: ++// dtoverlay=spi1-2cs ++// dtoverlay=mcp23s17:s08-spi1-0-present=12,s17-spi1-1-present=131 ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ // disable spi-dev on spi0.0 ++ fragment@0 { ++ target = <&spidev0>; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi0.1 ++ fragment@1 { ++ target = <&spidev1>; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi1.0 ++ fragment@2 { ++ target-path = "spi1/spidev@0"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi1.1 ++ fragment@3 { ++ target-path = "spi1/spidev@1"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi1.2 ++ fragment@4 { ++ target-path = "spi1/spidev@2"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi2.0 ++ fragment@5 { ++ target-path = "spi2/spidev@0"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi2.1 ++ fragment@6 { ++ target-path = "spi2/spidev@1"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // disable spi-dev on spi2.2 ++ fragment@7 { ++ target-path = "spi2/spidev@2"; ++ __dormant__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi0.0 ++ fragment@8 { ++ target = <&spi0>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_00: mcp23s08@0 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi0-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi0-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi0.1 ++ fragment@9 { ++ target = <&spi0>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_01: mcp23s08@1 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi0-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi0-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi1.0 ++ fragment@10 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_10: mcp23s08@0 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi1-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi1-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi1.1 ++ fragment@11 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_11: mcp23s08@1 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi1-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi1-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi1.2 ++ fragment@12 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_12: mcp23s08@2 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi1-2-present parameter */ ++ reg = <2>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi1-2-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi2.0 ++ fragment@13 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_20: mcp23s08@0 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi2-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi2-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi2.1 ++ fragment@14 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_21: mcp23s08@1 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi2-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi2-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s08s on spi2.2 ++ fragment@15 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s08_22: mcp23s08@2 { ++ compatible = "microchip,mcp23s08"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s08-spi2-2-present parameter */ ++ reg = <2>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s08-spi2-2-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi0.0 ++ fragment@16 { ++ target = <&spi0>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_00: mcp23s17@0 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi0-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi0-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi0.1 ++ fragment@17 { ++ target = <&spi0>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_01: mcp23s17@1 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi0-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi0-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi1.0 ++ fragment@18 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_10: mcp23s17@0 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi1-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi1-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi1.1 ++ fragment@19 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_11: mcp23s17@1 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi1-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi1-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi1.2 ++ fragment@20 { ++ target = <&spi1>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_12: mcp23s17@2 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi1-2-present parameter */ ++ reg = <2>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi1-2-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi2.0 ++ fragment@21 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_20: mcp23s17@0 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi2-0-present parameter */ ++ reg = <0>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi2-0-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi2.1 ++ fragment@22 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_21: mcp23s17@1 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi2-1-present parameter */ ++ reg = <1>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi2-1-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // enable one or more mcp23s17s on spi2.2 ++ fragment@23 { ++ target = <&spi2>; ++ __dormant__ { ++ status = "okay"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ mcp23s17_22: mcp23s17@2 { ++ compatible = "microchip,mcp23s17"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ microchip,spi-present-mask = <0x00>; /* overwritten by mcp23s17-spi2-2-present parameter */ ++ reg = <2>; ++ spi-max-frequency = <500000>; ++ status = "okay"; ++ #interrupt-cells=<2>; ++ interrupts = <0 2>; /* 1st word overwritten by mcp23s17-spi2-2-int-gpio parameter */ ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi0.0 as a input with no pull-up/down ++ fragment@24 { ++ target = <&gpio>; ++ __dormant__ { ++ spi0_0_int_pins: spi0_0_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi0-0-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi0.1 as a input with no pull-up/down ++ fragment@25 { ++ target = <&gpio>; ++ __dormant__ { ++ spi0_1_int_pins: spi0_1_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi0-1-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi1.0 as a input with no pull-up/down ++ fragment@26 { ++ target = <&gpio>; ++ __dormant__ { ++ spi1_0_int_pins: spi1_0_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi1-0-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi1.1 as a input with no pull-up/down ++ fragment@27 { ++ target = <&gpio>; ++ __dormant__ { ++ spi1_1_int_pins: spi1_1_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi1-1-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi1.2 as a input with no pull-up/down ++ fragment@28 { ++ target = <&gpio>; ++ __dormant__ { ++ spi1_2_int_pins: spi1_2_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi1-2-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi2.0 as a input with no pull-up/down ++ fragment@29 { ++ target = <&gpio>; ++ __dormant__ { ++ spi2_0_int_pins: spi2_0_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi2-0-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi2.1 as a input with no pull-up/down ++ fragment@30 { ++ target = <&gpio>; ++ __dormant__ { ++ spi2_1_int_pins: spi2_1_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi2-1-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Configure GPIO pin connected to INT(A/B) output of mcp23s08/17 on spi2.2 as a input with no pull-up/down ++ fragment@31 { ++ target = <&gpio>; ++ __dormant__ { ++ spi2_2_int_pins: spi2_2_int_pins { ++ brcm,pins = <0>; /* overwritten by mcp23s08/17-spi2-2-int-gpio parameter */ ++ brcm,function = <0>; ++ brcm,pull = <0>; ++ }; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi0.0. ++ // Use default active low interrupt signalling. ++ fragment@32 { ++ target = <&mcp23s08_00>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi0.1. ++ // Use default active low interrupt signalling. ++ fragment@33 { ++ target = <&mcp23s08_01>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi1.0. ++ // Use default active low interrupt signalling. ++ fragment@34 { ++ target = <&mcp23s08_10>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi1.1. ++ // Use default active low interrupt signalling. ++ fragment@35 { ++ target = <&mcp23s08_11>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi1.2. ++ // Use default active low interrupt signalling. ++ fragment@36 { ++ target = <&mcp23s08_12>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi2.0. ++ // Use default active low interrupt signalling. ++ fragment@37 { ++ target = <&mcp23s08_20>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi2.1. ++ // Use default active low interrupt signalling. ++ fragment@38 { ++ target = <&mcp23s08_21>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s08 on spi2.2. ++ // Use default active low interrupt signalling. ++ fragment@39 { ++ target = <&mcp23s08_22>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi0.0. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Use default active low interrupt signalling. ++ fragment@40 { ++ target = <&mcp23s17_00>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi0.1. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@41 { ++ target = <&mcp23s17_01>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi1.0. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@42 { ++ target = <&mcp23s17_10>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi1.1. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@43 { ++ target = <&mcp23s17_11>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi1.2. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@44 { ++ target = <&mcp23s17_12>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi2.0. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@45 { ++ target = <&mcp23s17_20>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi2.1. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@46 { ++ target = <&mcp23s17_21>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ // Enable interrupts for a mcp23s17 on spi2.2. ++ // Enable mirroring so that either INTA or INTB output of mcp23s17 can be connected to the GPIO pin. ++ // Configure INTA/B outputs of mcp23s08/17 as active low. ++ fragment@47 { ++ target = <&mcp23s17_22>; ++ __dormant__ { ++ interrupt-parent = <&gpio>; ++ interrupt-controller; ++ microchip,irq-mirror; ++ }; ++ }; ++ ++ __overrides__ { ++ s08-spi0-0-present = <0>,"+0+8", <&mcp23s08_00>,"microchip,spi-present-mask:0"; ++ s08-spi0-1-present = <0>,"+1+9", <&mcp23s08_01>,"microchip,spi-present-mask:0"; ++ s08-spi1-0-present = <0>,"+2+10", <&mcp23s08_10>,"microchip,spi-present-mask:0"; ++ s08-spi1-1-present = <0>,"+3+11", <&mcp23s08_11>,"microchip,spi-present-mask:0"; ++ s08-spi1-2-present = <0>,"+4+12", <&mcp23s08_12>,"microchip,spi-present-mask:0"; ++ s08-spi2-0-present = <0>,"+5+13", <&mcp23s08_20>,"microchip,spi-present-mask:0"; ++ s08-spi2-1-present = <0>,"+6+14", <&mcp23s08_21>,"microchip,spi-present-mask:0"; ++ s08-spi2-2-present = <0>,"+7+15", <&mcp23s08_22>,"microchip,spi-present-mask:0"; ++ s17-spi0-0-present = <0>,"+0+16", <&mcp23s17_00>,"microchip,spi-present-mask:0"; ++ s17-spi0-1-present = <0>,"+1+17", <&mcp23s17_01>,"microchip,spi-present-mask:0"; ++ s17-spi1-0-present = <0>,"+2+18", <&mcp23s17_10>,"microchip,spi-present-mask:0"; ++ s17-spi1-1-present = <0>,"+3+19", <&mcp23s17_11>,"microchip,spi-present-mask:0"; ++ s17-spi1-2-present = <0>,"+4+20", <&mcp23s17_12>,"microchip,spi-present-mask:0"; ++ s17-spi2-0-present = <0>,"+5+21", <&mcp23s17_20>,"microchip,spi-present-mask:0"; ++ s17-spi2-1-present = <0>,"+6+22", <&mcp23s17_21>,"microchip,spi-present-mask:0"; ++ s17-spi2-2-present = <0>,"+7+23", <&mcp23s17_22>,"microchip,spi-present-mask:0"; ++ s08-spi0-0-int-gpio = <0>,"+24+32", <&spi0_0_int_pins>,"brcm,pins:0", <&mcp23s08_00>,"interrupts:0"; ++ s08-spi0-1-int-gpio = <0>,"+25+33", <&spi0_1_int_pins>,"brcm,pins:0", <&mcp23s08_01>,"interrupts:0"; ++ s08-spi1-0-int-gpio = <0>,"+26+34", <&spi1_0_int_pins>,"brcm,pins:0", <&mcp23s08_10>,"interrupts:0"; ++ s08-spi1-1-int-gpio = <0>,"+27+35", <&spi1_1_int_pins>,"brcm,pins:0", <&mcp23s08_11>,"interrupts:0"; ++ s08-spi1-2-int-gpio = <0>,"+28+36", <&spi1_2_int_pins>,"brcm,pins:0", <&mcp23s08_12>,"interrupts:0"; ++ s08-spi2-0-int-gpio = <0>,"+29+37", <&spi2_0_int_pins>,"brcm,pins:0", <&mcp23s08_20>,"interrupts:0"; ++ s08-spi2-1-int-gpio = <0>,"+30+38", <&spi2_1_int_pins>,"brcm,pins:0", <&mcp23s08_21>,"interrupts:0"; ++ s08-spi2-2-int-gpio = <0>,"+31+39", <&spi2_2_int_pins>,"brcm,pins:0", <&mcp23s08_22>,"interrupts:0"; ++ s17-spi0-0-int-gpio = <0>,"+24+40", <&spi0_0_int_pins>,"brcm,pins:0", <&mcp23s17_00>,"interrupts:0"; ++ s17-spi0-1-int-gpio = <0>,"+25+41", <&spi0_1_int_pins>,"brcm,pins:0", <&mcp23s17_01>,"interrupts:0"; ++ s17-spi1-0-int-gpio = <0>,"+26+42", <&spi1_0_int_pins>,"brcm,pins:0", <&mcp23s17_10>,"interrupts:0"; ++ s17-spi1-1-int-gpio = <0>,"+27+43", <&spi1_1_int_pins>,"brcm,pins:0", <&mcp23s17_11>,"interrupts:0"; ++ s17-spi1-2-int-gpio = <0>,"+28+44", <&spi1_2_int_pins>,"brcm,pins:0", <&mcp23s17_12>,"interrupts:0"; ++ s17-spi2-0-int-gpio = <0>,"+29+45", <&spi2_0_int_pins>,"brcm,pins:0", <&mcp23s17_20>,"interrupts:0"; ++ s17-spi2-1-int-gpio = <0>,"+30+46", <&spi2_1_int_pins>,"brcm,pins:0", <&mcp23s17_21>,"interrupts:0"; ++ s17-spi2-2-int-gpio = <0>,"+31+47", <&spi2_2_int_pins>,"brcm,pins:0", <&mcp23s17_22>,"interrupts:0"; ++ }; ++}; ++ + +From 255e9be2c624acf3995e9e0787b9c513e0dea077 Mon Sep 17 00:00:00 2001 +From: Georgii Staroselskii +Date: Tue, 23 Aug 2016 17:40:05 +0400 +Subject: [PATCH 142/147] overlays: added sc16is750 UART over I2C (#1617) + +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 10 ++++++ + .../boot/dts/overlays/sc16is750-i2c-overlay.dts | 37 ++++++++++++++++++++++ + 3 files changed, 48 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index dc72052757ae5c79d7f196c900d9c0f13ab97a42..35a1673379d4fb9aa4c1028310a44b79e23ac2ce 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -74,6 +74,7 @@ dtbo-$(RPI_DT_OVERLAYS) += rpi-ft5406.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo + dtbo-$(RPI_DT_OVERLAYS) += rra-digidac1-wm8741-audio.dtbo ++dtbo-$(RPI_DT_OVERLAYS) += sc16is750-i2c.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sc16is752-spi1.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo + dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 87042af8550e5d16069a42329e34227a21e4b932..f93b8ffd40157da92685095f75ea67943153a16b 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -927,6 +927,16 @@ Load: dtoverlay=rra-digidac1-wm8741-audio + Params: + + ++Name: sc16is750-i2c ++Info: Overlay for the NXP SC16IS750 UART with I2C Interface ++ Enables the chip on I2C1 at 0x48. To select another address, ++ please refer to table 10 in reference manual. ++ ++Load: dtoverlay=sc16is750-i2c,= ++Params: int_pin GPIO used for IRQ (default 24) ++ addr Address (default 0x48) ++ ++ + Name: sc16is752-spi1 + Info: Overlay for the NXP SC16IS752 Dual UART with SPI Interface + Enables the chip on SPI1. +diff --git a/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts b/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..339d0d17c01ff182edd0871de9dc4ea744917ad4 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts +@@ -0,0 +1,37 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; ++ ++ fragment@0 { ++ target = <&i2c_arm>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ sc16is750: sc16is750@48 { ++ compatible = "nxp,sc16is750"; ++ reg = <0x48>; /* address */ ++ clocks = <&sc16is750_clk>; ++ interrupt-parent = <&gpio>; ++ interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */ ++ #gpio-cells = <2>; ++ ++ sc16is750_clk: sc16is750_clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <14745600>; ++ }; ++ }; ++ }; ++ }; ++ ++ ++ __overrides__ { ++ int_pin = <&sc16is750>,"interrupts:0"; ++ addr = <&sc16is750>,"reg:0"; ++ }; ++ ++}; + +From c8280f68f1d0c8184eab0631ab363c6fce0a2ea3 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 22 Aug 2016 11:56:04 +0100 +Subject: [PATCH 143/147] overlays: Clarify gpio-poweroff semantics in README + +1) GPIO pin is signalled on poweroff, not reboot. +2) In RPi kernels, halt is equivalent to poweroff. + +See: https://github.com/raspberrypi/linux/issues/1600 +--- + arch/arm/boot/dts/overlays/README | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index f93b8ffd40157da92685095f75ea67943153a16b..7a98f105eb94b95f0f592cad5dd20dd63342dd38 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -340,7 +340,7 @@ Params: gpio_pin Input pin number. Default is 18. + + + Name: gpio-poweroff +-Info: Drives a GPIO high or low on reboot ++Info: Drives a GPIO high or low on poweroff (including halt) + Load: dtoverlay=gpio-poweroff,= + Params: gpiopin GPIO for signalling (default 26) + + +From 4ca5aaf0a2bf4e25d2dfa30eb67691f20637083d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 9 Aug 2016 21:51:41 +0100 +Subject: [PATCH 144/147] overlays: Add assert_falling_edge to pps-gpio overlay + +See: https://github.com/raspberrypi/linux/issues/1590 +--- + arch/arm/boot/dts/overlays/README | 2 ++ + arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 7a98f105eb94b95f0f592cad5dd20dd63342dd38..37f00748a0a240e25c06e621915683f88962d3be 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -824,6 +824,8 @@ Name: pps-gpio + Info: Configures the pps-gpio (pulse-per-second time signal via GPIO). + Load: dtoverlay=pps-gpio,= + Params: gpiopin Input GPIO (default "18") ++ assert_falling_edge When present, assert is indicated by a falling ++ edge, rather than by a rising edge + + + Name: pwm +diff --git a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts +index 40bf0e11015f5abebd0d4139276da888d728d569..50143a4bb215807ba0a0d0562f5827fa29a04de4 100644 +--- a/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pps-gpio-overlay.dts +@@ -30,5 +30,6 @@ + __overrides__ { + gpiopin = <&pps>,"gpios:4", + <&pps_pins>,"brcm,pins:0"; ++ assert_falling_edge = <&pps>,"assert-falling-edge?"; + }; + }; + +From ae63d37e4f183fbcf4bffa7bf126e8f0eb174c52 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 2 Sep 2016 17:21:42 +0100 +Subject: [PATCH 145/147] bcm2835-sdhost: Don't exit cmd wait loop on error + +The FAIL flag can be set in the CMD register before command processing +is complete, leading to spurious "failed to complete" errors. This has +the effect of promoting harmless CRC7 errors during CMD1 processing +into errors that can delay and even prevent booting. + +Also: +1) Convert the last KERN_ERROR message in the register dumping to + KERN_INFO. +2) Remove an unnecessary reset call from bcm2835_sdhost_add_host. + +See: https://github.com/raspberrypi/linux/pull/1492 + +Signed-off-by: Phil Elwell +--- + drivers/mmc/host/bcm2835-sdhost.c | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/drivers/mmc/host/bcm2835-sdhost.c b/drivers/mmc/host/bcm2835-sdhost.c +index d7b6b5a4e31f7aaa76470d3a79ea78a643184855..22bfb340011b0c857f8eb4824eb0b656def6a006 100644 +--- a/drivers/mmc/host/bcm2835-sdhost.c ++++ b/drivers/mmc/host/bcm2835-sdhost.c +@@ -373,7 +373,7 @@ static void bcm2835_sdhost_dumpregs(struct bcm2835_host *host) + pr_info("%s: SDRSP2 0x%08x\n", + mmc_hostname(host->mmc), + bcm2835_sdhost_read(host, SDRSP2)); +- pr_err("%s: SDRSP3 0x%08x\n", ++ pr_info("%s: SDRSP3 0x%08x\n", + mmc_hostname(host->mmc), + bcm2835_sdhost_read(host, SDRSP3)); + pr_info("%s: SDHSTS 0x%08x\n", +@@ -1183,9 +1183,8 @@ static void bcm2835_sdhost_finish_command(struct bcm2835_host *host, + retries = 1; // We've already waited long enough this time + } + +- retries = host->cmd_quick_poll_retries; + for (sdcmd = bcm2835_sdhost_read(host, SDCMD); +- (sdcmd & SDCMD_NEW_FLAG) && !(sdcmd & SDCMD_FAIL_FLAG) && retries; ++ (sdcmd & SDCMD_NEW_FLAG) && retries; + retries--) { + cpu_relax(); + sdcmd = bcm2835_sdhost_read(host, SDCMD); +@@ -1208,8 +1207,7 @@ static void bcm2835_sdhost_finish_command(struct bcm2835_host *host, + usleep_range(1, 10); + spin_lock_irqsave(&host->lock, *irq_flags); + sdcmd = bcm2835_sdhost_read(host, SDCMD); +- if (!(sdcmd & SDCMD_NEW_FLAG) || +- (sdcmd & SDCMD_FAIL_FLAG)) ++ if (!(sdcmd & SDCMD_NEW_FLAG)) + break; + } + } +@@ -1892,8 +1890,6 @@ int bcm2835_sdhost_add_host(struct bcm2835_host *host) + + mmc = host->mmc; + +- bcm2835_sdhost_reset_internal(host); +- + mmc->f_max = host->max_clk; + mmc->f_min = host->max_clk / SDCDIV_MAX_CDIV; + + +From 9a3438b31ee12f2574fd79e71fd084156c63823d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 2 Sep 2016 14:35:37 +0100 +Subject: [PATCH 146/147] BCM270X_DT: Use bcm2835-sdhost on Compute Module + +With the preceding commit: + + bcm2835-sdhost: Don't exit cmd wait loop on error + +it is safe to use the bcm2835-sdhost driver on the Compute Module. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2708-rpi-cm.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +index f07609d97225b355dd2b6981d4f1fa28d0d40950..d33d462b4090e4a4f967a37212918b9cf500bf76 100644 +--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi ++++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi +@@ -23,9 +23,9 @@ + }; + + +-&mmc { ++&sdhost { + pinctrl-names = "default"; +- pinctrl-0 = <&mmc_pins>; ++ pinctrl-0 = <&sdhost_pins>; + non-removable; + bus-width = <4>; + status = "okay"; + +From 8bd69b6769d77445005957ac91df80c98066f501 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 7 Sep 2016 16:57:59 +0100 +Subject: [PATCH 147/147] fbmem: Ensure that parameters are properly checked + within fb_copyarea_user + +--- + drivers/video/fbdev/core/fbmem.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c +index 1d3b35ec8e393aac43dca0ec4566f7a7d0d8998a..7bf48e478c056fcd745026902961506d5826615d 100644 +--- a/drivers/video/fbdev/core/fbmem.c ++++ b/drivers/video/fbdev/core/fbmem.c +@@ -1090,7 +1090,13 @@ static int fb_copyarea_user(struct fb_info *info, + int ret = 0; + if (!lock_fb_info(info)) + return -ENODEV; +- if (copy->dx + copy->width > info->var.xres || ++ if (copy->dx >= info->var.xres || ++ copy->sx >= info->var.xres || ++ copy->width > info->var.xres || ++ copy->dy >= info->var.yres || ++ copy->sy >= info->var.yres || ++ copy->height > info->var.yres || ++ copy->dx + copy->width > info->var.xres || + copy->sx + copy->width > info->var.xres || + copy->dy + copy->height > info->var.yres || + copy->sy + copy->height > info->var.yres) { diff --git a/tools/RPi/rpi-linux-rebase.sh b/tools/RPi/rpi-linux-rebase.sh index 1cd6e01654..3b46d60a9e 100755 --- a/tools/RPi/rpi-linux-rebase.sh +++ b/tools/RPi/rpi-linux-rebase.sh @@ -14,10 +14,23 @@ TODO=$1 # Drop commits not used DROP_COMMITS=" +Added Device IDs for August DVB-T 205 net\: Add non-mainline source for rtl8192cu wlan net\: Fix rtl8192cu build errors on other platforms -Added Device IDs for August DVB-T 205 -#Enable cfg80211 support + +# Other rtl8192cu related commits below... +Fix cfg80211 for kernel >= 4.7 \(#1624\) +suppress spurious messages +Add #if for 3\.14 kernel change \(#87\) +Set dev_type to wlan +Tentatively added support for more 8188CUS based devices\. +Add support for more 8188CUS and 8192CUS devices +Add ProductId for the Netgear N150 - WNA1000M +Fixes CONFIG_CONCURRENT_MODE CONFIG_MULTI_VIR_IFACES +Fixes compatibility with 3\.13 +Enables warning in the compiler and fixes some issues, reference => https\:\/\/github.com\/diederikdehaas\/rtl8812AU +Starts device in station mode instead of monitor, fixes NetworkManager issues +Enable cfg80211 support " IFS=$'\n' From 9a9e83e243d0e4afbfb417c84898d2cde9bd802d Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 7 Sep 2016 14:29:55 +0100 Subject: [PATCH 4/4] Revert "linux: add support for MN88473 DVB devices" This reverts commit f766996b87d9db60e4cb9d6a21955ba9c181df7f. --- projects/Generic/linux/linux.x86_64.conf | 1 - projects/RPi/linux/linux.arm.conf | 1 - projects/RPi2/linux/linux.arm.conf | 1 - 3 files changed, 3 deletions(-) diff --git a/projects/Generic/linux/linux.x86_64.conf b/projects/Generic/linux/linux.x86_64.conf index e55f5aafe5..0669e17fd4 100644 --- a/projects/Generic/linux/linux.x86_64.conf +++ b/projects/Generic/linux/linux.x86_64.conf @@ -4063,7 +4063,6 @@ CONFIG_VT6656=m CONFIG_STAGING_MEDIA=y CONFIG_DVB_CXD2099=m CONFIG_DVB_MN88472=m -CONFIG_DVB_MN88473=m # CONFIG_VIDEO_TW686X_KH is not set CONFIG_LIRC_STAGING=y # CONFIG_LIRC_BT829 is not set diff --git a/projects/RPi/linux/linux.arm.conf b/projects/RPi/linux/linux.arm.conf index 76340c9e70..98ba0a83dd 100644 --- a/projects/RPi/linux/linux.arm.conf +++ b/projects/RPi/linux/linux.arm.conf @@ -3309,7 +3309,6 @@ CONFIG_VT6656=m # CONFIG_SPEAKUP is not set CONFIG_STAGING_MEDIA=y CONFIG_DVB_MN88472=m -CONFIG_DVB_MN88473=m CONFIG_LIRC_STAGING=y # CONFIG_LIRC_IMON is not set CONFIG_LIRC_RPI=m diff --git a/projects/RPi2/linux/linux.arm.conf b/projects/RPi2/linux/linux.arm.conf index 27c89dfb24..b2c19331e9 100644 --- a/projects/RPi2/linux/linux.arm.conf +++ b/projects/RPi2/linux/linux.arm.conf @@ -3362,7 +3362,6 @@ CONFIG_VT6656=m # CONFIG_SPEAKUP is not set CONFIG_STAGING_MEDIA=y CONFIG_DVB_MN88472=m -CONFIG_DVB_MN88473=m CONFIG_LIRC_STAGING=y # CONFIG_LIRC_IMON is not set CONFIG_LIRC_RPI=m