From e3750de0672fbcd579814b8e5bc8697e01a5d6b9 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Fri, 14 Jul 2017 21:30:56 +0100 Subject: [PATCH] RPi: update linux support patch for linux 4.12 --- .../patches/linux/linux-01-RPi_support.patch | 3918 +++++++++++++++-- 1 file changed, 3630 insertions(+), 288 deletions(-) diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 2699998a3b..ae6ef037d1 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 e64a4148f9005910438ab81503557c30bd9bdade Mon Sep 17 00:00:00 2001 +From ce7d5dd41ed9cf356046f946e056761d2a648a1d Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/144] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/171] 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. @@ -48,10 +48,10 @@ index 2dfca96a63b60283b89efab676932a711024a499..88843b36182f0f12175df06e3a6fb55a usbnet_skb_return(dev, ax_skb); } -From 70b71337a83f0de84e0598ba70794461993e4bff Mon Sep 17 00:00:00 2001 +From 926e4e76359463436a5bf530cf727e0a36d9b3eb Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 002/144] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 002/171] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -94,10 +94,10 @@ index 88843b36182f0f12175df06e3a6fb55a3a8f47e5..27813c57707c4b001646a26d8b1174a0 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 5ca07052db7e44e228c8fa03f34e9988cab791bf Mon Sep 17 00:00:00 2001 +From f4a2d80cc816a3072d05fb4c7f48703b34bec64e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 003/144] Allow mac address to be set in smsc95xx +Subject: [PATCH 003/171] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -193,10 +193,10 @@ index 27813c57707c4b001646a26d8b1174a0162c55ec..fac7a5f8642030a7dca7807e6c4808ea eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From 7c594e79aa15545d590a0c8f44a94e7f7c742d28 Mon Sep 17 00:00:00 2001 +From aa404a59f3b676f89f5fc9544c7b8fbb913df20b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 004/144] Protect __release_resource against resources without +Subject: [PATCH 004/171] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -224,10 +224,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From eca8aba908e8374fd6a1cdc7fb1a2932d090317c Mon Sep 17 00:00:00 2001 +From e6e504fb795020747a5b3ea9b2c470f8a1e3981a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 005/144] mm: Remove the PFN busy warning +Subject: [PATCH 005/171] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -252,10 +252,10 @@ index 2302f250d6b1ba150e3c2e4e17cfb6c99574ab5b..f434dbb4aaa8845318e2d40153339b08 goto done; } -From a7ae3d7159637d82ebe1c1f1a1b9653f726cdcb5 Mon Sep 17 00:00:00 2001 +From 76e455fdca7fefe15ef3b15a25bb089aaed47586 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 006/144] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 006/171] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -282,10 +282,10 @@ index e7463e3c08143acae3e8cc5682f918c6a0b07ebd..a8db33b50ad9ff83d284fa54fe4d3b65 #endif } else if (stat) { -From ba9685354cad5ce0e3ed8c11c681a3c4353f2bec Mon Sep 17 00:00:00 2001 +From 2449f4ea8449fd3677b93bbe8f199d4773638d60 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 007/144] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 007/171] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -309,10 +309,10 @@ index a8db33b50ad9ff83d284fa54fe4d3b65f859df0f..c4e151451cf8c8ebde5225515eac2786 static void -From 21b79cfe013eab7a54e9e0460e40b36ad35f17b1 Mon Sep 17 00:00:00 2001 +From 438f1b18375c5f4e76daebbcefab8564c9f0c76e 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 008/144] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 008/171] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -441,10 +441,10 @@ index 44d7c38dde479d771f3552e914bf8c1c1f5019f7..42ff5e6a8e0d532f5b60a1e7af7cc4d9 } -From 803235f9180c268cba051f236152cd5241576db3 Mon Sep 17 00:00:00 2001 +From dfed8115227d27c856540a8e8d59899b202bedaa 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 009/144] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 009/171] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -543,10 +543,10 @@ index 42ff5e6a8e0d532f5b60a1e7af7cc4d941bd5008..eccf6ed025299cb480884f5bcbe77abf for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 6f7534c156c2cdb39c73e21510d017a2da4628d3 Mon Sep 17 00:00:00 2001 +From b7c4220327a2a73b7bb6676be588716272d13f6f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 010/144] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 010/171] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -567,10 +567,10 @@ index 9a2a79a871ba009fcfa8b7e2b52002c8845d94ce..4ffd24e8c50fd0df03cbb1257448c202 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From 2d3cf0c1fa55abf4dd7dd8226cb6441e42853594 Mon Sep 17 00:00:00 2001 +From 9e1dc54fc954661be21dfe837b737d8ca9da7bc5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Jan 2017 18:25:01 +0000 -Subject: [PATCH 011/144] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" +Subject: [PATCH 011/171] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" This reverts commit 85ae9e512f437cd09bf61564bdba29ab88bab3e3. --- @@ -864,10 +864,10 @@ index 85d0091128644c446aed878e87769e82c77c3ebf..4f2621272bfd5cbc0d691d2fabe89e2e if (IS_ERR(pc->pctl_dev)) { gpiochip_remove(&pc->gpio_chip); -From c73adda0454a2aaf0d2a0b001a2971a0d4f9c03f Mon Sep 17 00:00:00 2001 +From 49d528286e5efff6eb8f3f2a344f5a3bcb7f29e9 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 012/144] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 012/171] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -889,10 +889,10 @@ index 4f2621272bfd5cbc0d691d2fabe89e2ee428d6db..5b7cb4c415e19f98e25b221ab0ad36b6 .can_sleep = false, }; -From d8a45983e34a8a163c227496c6f8b4d417fd3b5f Mon Sep 17 00:00:00 2001 +From cc07fa5a809385b646706ad07e19eaa0db76127f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 013/144] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 013/171] pinctrl-bcm2835: Only request the interrupts listed in the DTB Although the GPIO controller can generate three interrupts (four counting @@ -919,10 +919,10 @@ index 5b7cb4c415e19f98e25b221ab0ad36b6885dae4c..6351fe7f8e314ac5ebb102dd20847b38 pc->irq_data[i].irqgroup = i; -From 606fc2d216cfdb1eeb6fea687026905bd78ae495 Mon Sep 17 00:00:00 2001 +From 7e7ffbc5e83a746f65bc373e09cf918f2a13699a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 014/144] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 014/171] 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 @@ -1003,10 +1003,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 531be8543e658a1a09c6fea88e8ad9a30ab151ea Mon Sep 17 00:00:00 2001 +From e7912f8eac4cb5636ac66a518d073aad31f05ff8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 015/144] spi-bcm2835: Disable forced software CS +Subject: [PATCH 015/171] 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 @@ -1040,10 +1040,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From 99fecb2547f85e281c19ebd3cea39d56c475ccf5 Mon Sep 17 00:00:00 2001 +From 2804e73844422b72ea61f27de75b2dfc3bcaec25 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 016/144] spi-bcm2835: Remove unused code +Subject: [PATCH 016/171] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -1131,10 +1131,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 590288e88e32973e76789603d1dd346a0533c44b Mon Sep 17 00:00:00 2001 +From cd069e4ffd539ec1810ab4f6cbd0379fbcce9125 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 017/144] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 017/171] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1187,10 +1187,10 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From 8cff1e15df429d187397902eeb57c3cfe9b5b54f Mon Sep 17 00:00:00 2001 +From cefc7a41cf11c608f42555a1dc91f9bfa6979d21 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 018/144] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 018/171] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1293,10 +1293,10 @@ index 6204cc32d09c5096df8aec304c3c37b3bcb6be44..599c218dc8a73172dd4bd4a058fc8f95 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 16e9fdb19e4960e5893fc59eeda9a9ad5e346f98 Mon Sep 17 00:00:00 2001 +From 0aea92fa03ffe781d39aef053f930941e8aa27c6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 019/144] firmware: Updated mailbox header +Subject: [PATCH 019/171] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ @@ -1357,10 +1357,10 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From f579465344f71efa18d731658e8e6c4ede055fa0 Mon Sep 17 00:00:00 2001 +From b905df9b142e1ef5c9c005a821b8277772c4a1be Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 020/144] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 020/171] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -1380,10 +1380,10 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From 715508d50cdf523bca5d38023bd4818b773669e0 Mon Sep 17 00:00:00 2001 +From 17258613cc4c5faadd48965ea7f4e009b752c025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Fri, 7 Oct 2016 16:50:59 +0200 -Subject: [PATCH 021/144] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 021/171] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1485,10 +1485,10 @@ index b339e0e67b4c1275fd4992fea4f1e24c0575b783..26b7177573fac2af1cd4ab5488d2686f static int bcm2835_wdt_probe(struct platform_device *pdev) -From 1df9cc56933bf43fa09bf7539a230e100b360973 Mon Sep 17 00:00:00 2001 +From 873204b55128e7a82a37e21a21485057fc2d4e4b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 022/144] reboot: Use power off rather than busy spinning when +Subject: [PATCH 022/171] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1511,10 +1511,10 @@ index 3b2aa9a9fe268d45335f781c4aa22cf573753a1b..0180d89a34af45c56243fe0f17fbe209 /* -From 64c66f4ade55b53dbd784a61663c6cbd4443aa56 Mon Sep 17 00:00:00 2001 +From 36065464ba70e09be9f5b4ba3964250def25d6ac Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 023/144] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 023/171] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1533,10 +1533,10 @@ index a39b0d58ddd0fdf0ac1cc7295f8aafb12546e226..e037a6dd79d1881a09e3ca9115782709 help This enables support for the RPi power domains which can be enabled -From 772d0824fa63c191a5cb459402f01274b872637a Mon Sep 17 00:00:00 2001 +From 760dba8e19e9887faa212b550c595edcccbec202 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 024/144] Register the clocks early during the boot process, so +Subject: [PATCH 024/171] 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. @@ -1581,10 +1581,10 @@ index 02585387061967ac9408e18ac1bce67e9e9414c0..283d2de45e4f29406d01f24ab1cae3f9 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From d2fca1a9a441f9826cdeb86de92ced56fcd1a8fc Mon Sep 17 00:00:00 2001 +From abdea6a43d8a0cfe44de31a33657e444f858152c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 025/144] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 025/171] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1610,10 +1610,10 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From fa8023bebcd5001d5e76fd661b316cb5d37172c7 Mon Sep 17 00:00:00 2001 +From 158a3a5918e2d8ef82731c0a99401c47c2a93408 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 026/144] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 026/171] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1633,10 +1633,10 @@ index 61f87a99bf0a1c512e572d3cbdcf4b4b5d7ae785..0a5e36778eacf7dc589486f8bc8033f5 esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From 645c8e1be4dc36b4bcde1813a0235cbc7e395a22 Mon Sep 17 00:00:00 2001 +From 39a3750eb35d098ddf8b7c9d348d06ffba6e452e Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 027/144] BCM2835_DT: Fix I2S register map +Subject: [PATCH 027/171] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -1674,10 +1674,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 9faff9390771a9d48fdf848b248b2f929cced8e3 Mon Sep 17 00:00:00 2001 +From 0332fd2112a6a9d957838516fa83abd4f3058c49 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 028/144] clk-bcm2835: Mark used PLLs and dividers CRITICAL +Subject: [PATCH 028/171] clk-bcm2835: Mark used PLLs and dividers CRITICAL The VPU configures and relies on several PLLs and dividers. Mark all enabled dividers and their PLLs as CRITICAL to prevent the kernel from @@ -1705,10 +1705,10 @@ index 283d2de45e4f29406d01f24ab1cae3f9f879234a..85df8c74a309f0b877ef65f1c55b086f divider->data = data; -From 9d4a257f47fb8410abc05ff8d2d6421f327d3e54 Mon Sep 17 00:00:00 2001 +From b776846dcca29a77687ba41de2f27f63787c7a92 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 029/144] clk-bcm2835: Add claim-clocks property +Subject: [PATCH 029/171] clk-bcm2835: Add claim-clocks property The claim-clocks property can be used to prevent PLLs and dividers from being marked as critical. It contains a vector of clock IDs, @@ -1810,10 +1810,10 @@ index 85df8c74a309f0b877ef65f1c55b086f1bb774a1..eec6735505c074c0a76ae647bf0e1bb6 sizeof(cprman_parent_names)); of_clk_parent_fill(dev->of_node, cprman->real_parent_names, -From ad65692b6f840eba4a847ea0bb40c211e601a583 Mon Sep 17 00:00:00 2001 +From b4f8611fd3848fd005c6a917a0ddcf87800c7af7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:06:53 +0000 -Subject: [PATCH 030/144] clk-bcm2835: Correct the prediv logic +Subject: [PATCH 030/171] clk-bcm2835: Correct the prediv logic If a clock has the prediv flag set, both the integer and fractional parts must be scaled when calculating the resulting frequency. @@ -1840,10 +1840,10 @@ index eec6735505c074c0a76ae647bf0e1bb68ab3a488..e0d28add45efdf70d1eba590282a3a26 return bcm2835_pll_rate_from_divisors(parent_rate, ndiv, fdiv, pdiv); } -From 1ed7cb5f8f02a0ddc5377f0c80026ce526cf6d83 Mon Sep 17 00:00:00 2001 +From 4a69190cd4d579ad1f4d0f6c6283a09868085219 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 -Subject: [PATCH 031/144] clk-bcm2835: Read max core clock from firmware +Subject: [PATCH 031/171] clk-bcm2835: Read max core clock from firmware The VPU is responsible for managing the core clock, usually under direction from the bcm2835-cpufreq driver but not via the clk-bcm2835 @@ -1958,10 +1958,10 @@ index e0d28add45efdf70d1eba590282a3a2654af328d..39f72da6ba1f6ec6ec41d5dc1bf46344 for (i = 0; !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", -From c5de20af34c46d029b535acfd857843a57eea6ae Mon Sep 17 00:00:00 2001 +From e5d69d6e611f7d2888257141cc2beaa0b7d1ffee Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 032/144] sound: Demote deferral errors to INFO level +Subject: [PATCH 032/171] sound: Demote deferral errors to INFO level At present there is no mechanism to specify driver load order, which can lead to deferrals and repeated retries until successful. @@ -1996,10 +1996,10 @@ index 754e3ef8d7ae1b8b188c3e52986f2c306fb7b763..90b385d1f79b63ccc43a8d4ba849084a goto _err_defer; } -From 7f5f18c06735d6a47a3e7e6413d91803b17fa5db Mon Sep 17 00:00:00 2001 +From a50dbdc31a61bf470171a8a7fa5d746b3ff53130 Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 -Subject: [PATCH 033/144] Update vfpmodule.c +Subject: [PATCH 033/171] Update vfpmodule.c Christopher Alexander Tobias Schulze - May 2, 2015, 11:57 a.m. This patch fixes a problem with VFP state save and restore related @@ -2136,10 +2136,10 @@ index a71a48e71fffa8626fe90106815376c44bbe679b..d6c0a5a0a5ae3510db3ace5e3f5d3410 /* * Save the userland NEON/VFP state. Under UP, -From a9790cbc5a9c59a8cf793411887317392e01ddab Mon Sep 17 00:00:00 2001 +From 7d3b6a52ae5ccb097632ba89e3c30d008501c304 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 -Subject: [PATCH 034/144] ASoC: bcm2835_i2s.c: relax the ch2 register setting +Subject: [PATCH 034/171] ASoC: bcm2835_i2s.c: relax the ch2 register setting for 8 channels This patch allows ch2 registers to be set for 8 channels of audio. @@ -2160,10 +2160,10 @@ index 6ba20498202ed36906b52096893a88867a79269f..56df7d8a43d0aac055a91b0d24aca8e1 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); -From 0fc69dc7c58b2cb60b65a398794cc988f9e23a0e Mon Sep 17 00:00:00 2001 +From cb6549a449e9786e7d53ee3c915ca1cde73c48da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Date: Tue, 1 Nov 2016 15:15:41 +0100 -Subject: [PATCH 035/144] i2c: bcm2835: Add debug support +Subject: [PATCH 035/171] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2352,10 +2352,10 @@ index cd07a69e2e9355540442785f95e90823b05c9d10..47167f403cc8329bd811b47c7011c299 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From 61413bd7d72f222a3229dae8ccf5c051ffe1298c Mon Sep 17 00:00:00 2001 +From 4cf070211a6fa4acdbe70b1596f392335d32ee35 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 036/144] Main bcm2708/bcm2709 linux port +Subject: [PATCH 036/171] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2543,10 +2543,10 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From f42babc6934af74b213ae46463ca67f3b7551209 Mon Sep 17 00:00:00 2001 +From 41e819df095d0f175c3c654b8be6b1f83b3ad1b8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 037/144] Add dwc_otg driver +Subject: [PATCH 037/171] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -63688,10 +63688,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 094f2454339350d01a2d32ff8e838e7471ef2a93 Mon Sep 17 00:00:00 2001 +From 1a5a2e7fa32a7a6f92e9fa0a4aa2531cf21838d6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 038/144] bcm2708 framebuffer driver +Subject: [PATCH 038/171] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67150,10 +67150,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 4bd8ce5d45ef94e4ea158cac93e636eb0d1670ef Mon Sep 17 00:00:00 2001 +From f0fdd392374fd70a82a548cb9c0ded658a33ad2d Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 039/144] dmaengine: Add support for BCM2708 +Subject: [PATCH 039/171] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67784,10 +67784,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From 3e81240d0234fbd6a3bbea98482ceabf77885b5b Mon Sep 17 00:00:00 2001 +From 570b5ef33f32c7a0c35564182c07913a33c184ac Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 040/144] MMC: added alternative MMC driver +Subject: [PATCH 040/171] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69509,10 +69509,10 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From 4a95662d9055c4dc810933e197c67f35068ff64c Mon Sep 17 00:00:00 2001 +From 9e2316a5224340dec6d25d6bba2e60fff0e70ae9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 041/144] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 041/171] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -71918,10 +71918,10 @@ index 0000000000000000000000000000000000000000..9c6f199a7830959f31012d86bc1f8b1a +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From 57f09e1d7abaef4782d7471d5772d36435a4a968 Mon Sep 17 00:00:00 2001 +From f8f2d566105ad7790d9ea7555e1b6eba11d3154c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 042/144] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 042/171] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -72446,10 +72446,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From 6d6a32628c9ee7905c70e00cdcc2b8fedb0f13fb Mon Sep 17 00:00:00 2001 +From b39afe5f009cad73a4bb43cd89bc57048f5e842d Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 043/144] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 043/171] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -76904,10 +76904,10 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From 10ca67877c00c7ee3bae47c3833d8c90b70dbb31 Mon Sep 17 00:00:00 2001 +From 88945f5b242c9d603d008117e9be1718bfdab396 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 044/144] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 044/171] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -77215,10 +77215,10 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 43e8c68b28c3161a90bac475ea24533e874930c6 Mon Sep 17 00:00:00 2001 +From 029519adb5e4ff410bac04ace355d52bc3eea441 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 045/144] Add SMI driver +Subject: [PATCH 045/171] Add SMI driver Signed-off-by: Luke Wren --- @@ -79169,10 +79169,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From b80abee184ead08f5db6dcdba6a3d45d25cfe7dd Mon Sep 17 00:00:00 2001 +From a242912f01980a7af240539e1d0fe56c788b6e40 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 046/144] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 046/171] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -79342,10 +79342,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From 862a05e3e943800b0d56dc2d9ab9e9e1f1e97d2d Mon Sep 17 00:00:00 2001 +From 7df4e4832e002c5fe345fe7742a3ea581db29e52 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 047/144] Add SMI NAND driver +Subject: [PATCH 047/171] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -79710,10 +79710,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From ea3942f25c0e09b707f49d6b68528bfe1bd0df81 Mon Sep 17 00:00:00 2001 +From ae6af39b187f2f3181742d67d0e8012f0c11c7b5 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 048/144] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 048/171] 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 @@ -80574,10 +80574,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From 9a40ecd47f50076139cc7872f06b5650359d4fd9 Mon Sep 17 00:00:00 2001 +From 2d3804b799b7075934727f8299d976e0500e3d8f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 049/144] Add cpufreq driver +Subject: [PATCH 049/171] Add cpufreq driver Signed-off-by: popcornmix --- @@ -80844,10 +80844,10 @@ index 0000000000000000000000000000000000000000..414fbdc10dfbfc6e4bb47870a7af3fd5 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 5991e71dc1d668e7937187890b12db80fad3671f Mon Sep 17 00:00:00 2001 +From a65156e17c1ca76d14ac0094e64b3ecd5133082f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 050/144] Added hwmon/thermal driver for reporting core +Subject: [PATCH 050/171] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -81030,10 +81030,10 @@ index 0000000000000000000000000000000000000000..25b78c3eac1503fbc9e679b963a6284b +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); -From 51fb7b6b3f51fc81fb8bd666c1111f0f7f1c7161 Mon Sep 17 00:00:00 2001 +From 2054c4bcabc44fc7e35f7fc2a6f3ab40c02ceb0d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 051/144] Add Chris Boot's i2c driver +Subject: [PATCH 051/171] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81698,10 +81698,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 3e031f5512def9cfa0a7f4b8c14ffb05be36b5e9 Mon Sep 17 00:00:00 2001 +From 950a24bc528723b4c9aff73a102197ecfc2f3360 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 052/144] char: broadcom: Add vcio module +Subject: [PATCH 052/171] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81926,10 +81926,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 826f5458945bb8fadc32d675c5d656527057dd4b Mon Sep 17 00:00:00 2001 +From 4c88273e3c3df3b96a21a113c067828a07f2b43c 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 053/144] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 053/171] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82012,10 +82012,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From 736132373f19206c96257b17faeed8f246af9378 Mon Sep 17 00:00:00 2001 +From 82669dcde95e51d38991f54f1e20422f3e6cc030 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 054/144] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 054/171] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -82542,10 +82542,10 @@ index 0000000000000000000000000000000000000000..84be2593ec1de8f97b0167ff06b3e05d + return $trailer; +} -From 60cfd65e8f9b8cf90ba475f2404ed9b2f61b82ca Mon Sep 17 00:00:00 2001 +From 383ad308da1c87c5eaf45cc7b3f8cdbc4eb22a03 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 055/144] BCM2708: Add core Device Tree support +Subject: [PATCH 055/171] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -93990,10 +93990,10 @@ index 58c05e5d9870b6c18a72da7dc44ff3112994946d..9842523b225a88505d796cc689c04f40 # Bzip2 -From edaf82cd0b7598b31266d0b37bfb2922a343f9fb Mon Sep 17 00:00:00 2001 +From d0de395469b3e061c7e2be3f202027eca617eea8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 056/144] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 056/171] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -94168,10 +94168,10 @@ index 64c56d454f7df9f864a5242ce4212df586f66886..3fd74c8737871cb56f0355c858fc135e /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From 71f0a1fe97b5e5b741ebed4aa9e98ce29ee43f95 Mon Sep 17 00:00:00 2001 +From 13e8a430fa94759a1df266246928ca57bef4a2f7 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 057/144] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 057/171] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -94439,10 +94439,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From e318b8c8f6f487d56fe77c38539e7318d20dc5a0 Mon Sep 17 00:00:00 2001 +From 61a1e9578164a6f50dbf2d9c42c38b08ecd7b40d Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 058/144] Speed up console framebuffer imageblit function +Subject: [PATCH 058/171] 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 @@ -94651,10 +94651,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 3e87473fe8770f61af849320928e7138238ad402 Mon Sep 17 00:00:00 2001 +From 2910c0cd6e23111a153f01edac8094810c653206 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 059/144] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 059/171] 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 @@ -94904,10 +94904,10 @@ index d58594a3232492e33f1dd4babd3798b03e0f0203..feae94256256316fd9d850c3d83325af unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; -From 76904b9af21f6c296ef75bcfe47029c9873f6910 Mon Sep 17 00:00:00 2001 +From 599894fda4058ad256fa564f9a1bea4aadc6854a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 060/144] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 060/171] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -94939,10 +94939,10 @@ index 83772fa7d92a6f6178cd3a4a5c0fea28350040b5..3f4a7e34b3f775e712b1b4d6afe27a2a break; case HID_GD_JOYSTICK: -From 685932956db0e8f105087a8a06e4290028555005 Mon Sep 17 00:00:00 2001 +From 9e528fd4e45604fe777e0af44219617963e710b1 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 061/144] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 061/171] 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 @@ -95300,10 +95300,10 @@ index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From ee1cdf05d329570067e9b64304fd9fd00e650b7b Mon Sep 17 00:00:00 2001 +From c0c6b2c1e05b62d129ce303f2a332a4b34cc5fea Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 062/144] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 062/171] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -96878,10 +96878,10 @@ index 567601148318bf4a5fbc581d6c9881d9e190c409..45ea7866761a71470bd335f6f37ea603 bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From 97c87aefde74d516d195ceb3530e9765e11e4c25 Mon Sep 17 00:00:00 2001 +From 26fde171d432b66b127369db57e770a5403b13ae Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 063/144] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 063/171] 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 @@ -96916,10 +96916,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From 8f57cfdac18b9a8eeab61f2e49e0dedb5026537d Mon Sep 17 00:00:00 2001 +From 50b26ba8e26625ab4841706e70e25c18dbeb93e6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 064/144] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 064/171] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -97784,10 +97784,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From f61cdda73cd58c192b143a8f9203a9f4012c3340 Mon Sep 17 00:00:00 2001 +From 6a292ff5b3882e9a9bbbe9cff2c6e0bf99c85db4 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 065/144] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 065/171] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -97962,10 +97962,10 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 5ddaba141c91a9cebdaed9eea7ac54647494af2a Mon Sep 17 00:00:00 2001 +From 9538f328d8197ed60c0606acca7484688a714c09 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 066/144] ASoC: Add support for Rpi-DAC +Subject: [PATCH 066/171] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -98249,10 +98249,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From 77d5b0b8ef8f7ae79433e5c8e1760e8b24bd7d78 Mon Sep 17 00:00:00 2001 +From 059333e560e650388b1c02255e3ef601591c0ae0 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 067/144] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 067/171] 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 @@ -98301,10 +98301,10 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From d3911fb4886be568c3b7f49eed60d4bdd018cba7 Mon Sep 17 00:00:00 2001 +From 61764ff541fad6cf4d7688909a1e6ad694410d6e Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 068/144] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 068/171] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -98648,10 +98648,10 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 61a7c170ab537175f21fc7d24cd0f1ec98e16705 Mon Sep 17 00:00:00 2001 +From 34570e640f3d4def779481718d02a1d5d928271b Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 069/144] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 069/171] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -98986,10 +98986,10 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From c517793a82bc5862581225ade64369910432d042 Mon Sep 17 00:00:00 2001 +From d26a09fff191c5ecfd33c2403150443097fa4b0e Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 070/144] Added support for HiFiBerry DAC+ +Subject: [PATCH 070/171] 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. @@ -99619,10 +99619,10 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 4194d6ac027eb4f98ff0bd40e878362bebd52f68 Mon Sep 17 00:00:00 2001 +From dfa2ec6a1b63d2702425168758c6be3ceeb8b52c Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 071/144] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 071/171] 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. @@ -100457,10 +100457,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 260ed96013252e60b872613563d99cca41bb1eac Mon Sep 17 00:00:00 2001 +From e00b09a6867e0940eb5e78b4cef0f350414b0787 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 072/144] Add driver for rpi-proto +Subject: [PATCH 072/171] 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 @@ -100675,10 +100675,10 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From 4abb1f67b72bc8433a5371120b6064d778e383d9 Mon Sep 17 00:00:00 2001 +From fe9a84986b428870c8afc182b5d86921a15a880f Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 073/144] RaspiDAC3 support +Subject: [PATCH 073/171] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -100921,10 +100921,10 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 784209de4e2329d3e76a4f2b0451c9ee3d3a4e3b Mon Sep 17 00:00:00 2001 +From 75b22b0e2f69838076ce953b7554e2b5c0c91051 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 074/144] Add Support for JustBoom Audio boards +Subject: [PATCH 074/171] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -101380,10 +101380,10 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From e01744b986ee59608eee3f7a0158140ab85a9150 Mon Sep 17 00:00:00 2001 +From c7a11c43c806b49832853466b2102b43ccd7394d Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 075/144] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 075/171] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -101565,10 +101565,10 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 4ff6df092b1afd7982d3a2d59f7eae7e3035b456 Mon Sep 17 00:00:00 2001 +From 8481aba0730dab26a0ba1f36e3bc8e87c50c0bb3 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 076/144] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 076/171] 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. @@ -101819,10 +101819,10 @@ index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fd +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From 38ad9c36cfa71b8c9614dede3dc98f6a69c54025 Mon Sep 17 00:00:00 2001 +From 5046b631f1ed0ae3f0101c3a0a0242823cd43cca Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 077/144] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 077/171] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -102122,10 +102122,10 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From 6550f608b74314bb2e64801a30de2e9cae47e1d0 Mon Sep 17 00:00:00 2001 +From 01277a3dad455151cae24166efb76d53c031e401 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 078/144] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 078/171] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -102598,10 +102598,10 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From f92b61a014668884a7b4276832d9d165e539e766 Mon Sep 17 00:00:00 2001 +From d7deaee1371a3de230fe1cc2860e6811c4067e3c Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 079/144] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 079/171] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -102774,10 +102774,10 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From 9bdcc0f7cb9191a6caee59f8503229b6efce96c0 Mon Sep 17 00:00:00 2001 +From 857121b8db72fbfa5e39348d8212fcf24b0484c2 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 080/144] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 080/171] Allo Piano DAC boards: Initial 2 channel (stereo) support (#1645) Add initial 2 channel (stereo) support for Allo Piano DAC (2.0/2.1) boards, @@ -102984,10 +102984,10 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 3c7e238c096e693166fd6bcfa347ca458651d070 Mon Sep 17 00:00:00 2001 +From 61fcc7035fa91032b9d56665d604d6c22be7fa6d Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 -Subject: [PATCH 081/144] Add support for Allo Piano DAC 2.1 plus add-on board +Subject: [PATCH 081/171] Add support for Allo Piano DAC 2.1 plus add-on board for Raspberry Pi. The Piano DAC 2.1 has support for 4 channels with subwoofer. @@ -103732,10 +103732,10 @@ index 0000000000000000000000000000000000000000..56e43f98846b41e487b3089813f7edc3 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From 7fe9b8042fd9d5a3000e3ffca75b697b96744314 Mon Sep 17 00:00:00 2001 +From 99aeeb3d6debae11d1d99d7f9dd54ca0833f6904 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 -Subject: [PATCH 082/144] Add support for Allo Boss DAC add-on board for +Subject: [PATCH 082/171] Add support for Allo Boss DAC add-on board for Raspberry Pi. (#1924) Signed-off-by: Baswaraj K @@ -104438,10 +104438,10 @@ index 0000000000000000000000000000000000000000..203ab76c7045b081578e23bda1099dd1 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From 9bcb5619566c5b36cd75b8bd341897eaae90198d Mon Sep 17 00:00:00 2001 +From cc916a1f007cb2bfd40904403c2c014929db598b Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 083/144] Support for Blokas Labs pisound board +Subject: [PATCH 083/171] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -105640,10 +105640,10 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From 282aefba035d7cc088b6ae716c7d98389be8c91a Mon Sep 17 00:00:00 2001 +From 128eee17d3acc52a2a8d2ad91bf8e3570c0691bc Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 084/144] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 084/171] ASoC: Add driver for Cirrus Logic Audio Card Note: due to problems with deferred probing of regulators the following softdep should be added to a modprobe.d file @@ -106708,10 +106708,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From 7add6a67a38bdd4ae646a9ad935bd407243c104c Mon Sep 17 00:00:00 2001 +From 1f53d05fa655001ecc5270caf950deb7b05ae0d6 Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 -Subject: [PATCH 085/144] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT +Subject: [PATCH 085/171] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT Signed-off-by: Miquel Blauw --- @@ -106906,10 +106906,10 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From 124a54e0d492795e55e45112a4a19a9dd1f2c4fb Mon Sep 17 00:00:00 2001 +From 26d4c3d1f7cc6bfe2b2a761c733e943eae092af6 Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 -Subject: [PATCH 086/144] Add support for Fe-Pi audio sound card. (#1867) +Subject: [PATCH 086/171] Add support for Fe-Pi audio sound card. (#1867) Fe-Pi Audio Sound Card is based on NXP SGTL5000 codec. Mechanical specification of the board is the same the Raspberry Pi Zero. @@ -107123,10 +107123,10 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From d2df339bef23c3f7d25a5ee45197643541ee04e1 Mon Sep 17 00:00:00 2001 +From b0e8bcca33d3b5a3131cdf783e3e2ae92ae96379 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 -Subject: [PATCH 087/144] Add support for the AudioInjector.net Octo sound card +Subject: [PATCH 087/171] Add support for the AudioInjector.net Octo sound card AudioInjector Octo: sample rates, regulators, reset @@ -107528,10 +107528,10 @@ index 0000000000000000000000000000000000000000..dcf403ab37639ba79e38278d7e4b1ade +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From 3f8c0c5d1e6521082f02a4337e2ffe4edbfbae47 Mon Sep 17 00:00:00 2001 +From 2ab6adb233327296f762ce8553caed75d3ff2c32 Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 -Subject: [PATCH 088/144] Driver support for Google voiceHAT soundcard. +Subject: [PATCH 088/171] Driver support for Google voiceHAT soundcard. --- sound/soc/bcm/Kconfig | 7 ++ @@ -107922,10 +107922,10 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From 51ce28c1a2256d2130b64b88133a7a322f7165b0 Mon Sep 17 00:00:00 2001 +From 0587f11ae4182cbef5b03b48c8da9a5ca4593a18 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 089/144] rpi_display: add backlight driver and overlay +Subject: [PATCH 089/171] 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 @@ -108094,10 +108094,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From 2149b2cbb91ca19e00826fa9223915d9cd8f6bc2 Mon Sep 17 00:00:00 2001 +From 61707712727fd91da941338ecdb842fd0d286d42 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 090/144] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 090/171] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -108371,10 +108371,10 @@ index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d6 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From b2415c9a60aea3d08ded43c795f9d7081eac6931 Mon Sep 17 00:00:00 2001 +From 2e6fb9738a362b61908efc087e5a94263e80762f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 -Subject: [PATCH 091/144] bcm2835-gpio-exp: Driver for GPIO expander via +Subject: [PATCH 091/171] bcm2835-gpio-exp: Driver for GPIO expander via mailbox service Pi3 and Compute Module 3 have a GPIO expander that the @@ -108700,10 +108700,10 @@ index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 8dd1e6260c81c84c5a3afd059ccd4145214946a3 Mon Sep 17 00:00:00 2001 +From dc06a9d119c23a88cbe53fd37ddd74dbf9e0402c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 092/144] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 092/171] 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 @@ -108732,10 +108732,10 @@ index 8a857bb34fbb26c6d60784d3fe7576730a9aa5b3..0afd6f3ee7e8d021d6e324915af4dc7c uap->old_cr = 0; uap->port.dev = dev; -From 95dda1facf578a9330dac3a6e5ca14de43380a17 Mon Sep 17 00:00:00 2001 +From 423fc2e04a5f2b4f3f66eba77ef8c12d5ce0af31 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 -Subject: [PATCH 093/144] amba_pl011: Round input clock up +Subject: [PATCH 093/171] amba_pl011: Round input clock up The UART clock is initialised to be as close to the requested frequency as possible without exceeding it. Now that there is a @@ -108821,10 +108821,10 @@ index 0afd6f3ee7e8d021d6e324915af4dc7c7db56083..be4aa91bac66982b1fd9a13e9f971b3b /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From e8f0913f5753b172bb92e8ce22aeef4b801fd2d3 Mon Sep 17 00:00:00 2001 +From 4afb7a5b7bcd014401a9aa0e4bdd64699ff322f2 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 094/144] OF: DT-Overlay configfs interface +Subject: [PATCH 094/171] 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. @@ -109256,10 +109256,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 11db56a745bbe99216aa1322766fcabfd3ada3b5 Mon Sep 17 00:00:00 2001 +From 51e77eb844cc03e0ff8088195b916ef762eda1ae Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 095/144] brcm: adds support for BCM43341 wifi +Subject: [PATCH 095/171] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -109410,10 +109410,10 @@ index 5653d6dd38f6fe5c5132f2d7940facd31bef6549..7cde9835bcf38e7cffdf3dae0c33d2c9 BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From 29bb8d8b17793c7ad43f57e4f5e1fc9719f4cef7 Mon Sep 17 00:00:00 2001 +From 5c94987212bf49b8b9d35c74b1b5254c351d5b37 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 -Subject: [PATCH 096/144] brcmfmac: Mute expected startup 'errors' +Subject: [PATCH 096/171] brcmfmac: Mute expected startup 'errors' The brcmfmac WiFi driver always complains about the '00' country code. Modify the driver to ignore '00' silently. @@ -109437,10 +109437,10 @@ index e1bfd47ae97923a9f14689d8a0e5f45f5efa5650..e8637fe8026eab77902c9322fe0e4d43 req->alpha2[0], req->alpha2[1]); return; -From 087be81e7605ec4dd40c183783b7bba47bf86697 Mon Sep 17 00:00:00 2001 +From 443b8727a655a3d37868ec58913a37c2bbc5fd7e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 097/144] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 097/171] 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. @@ -109463,10 +109463,10 @@ index 90d0456b67446bcc624fab4b1542c4eaf21531b1..f9adeac3bbba6418dcca298c55706356 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From c27ff258579d497121a003b2646201cedb4a3683 Mon Sep 17 00:00:00 2001 +From b99baccfd8fe7018dbc5d9e0ebc4f4f957ee9174 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 098/144] config: Add default configs +Subject: [PATCH 098/171] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1314 +++++++++++++++++++++++++++++++++++ @@ -112124,10 +112124,10 @@ index 0000000000000000000000000000000000000000..ace19d6f5bc04091130bd28b65ce25e8 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From e964486ad0ee49d4e52a58ce8f7112c06af55584 Mon Sep 17 00:00:00 2001 +From 1935a1a7d69960295321670966d2ed3de1955977 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 099/144] Add arm64 configuration and device tree differences. +Subject: [PATCH 099/171] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -113541,10 +113541,10 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From 1c8195f816adb84cbf65da2e1a354f78f7c6ea99 Mon Sep 17 00:00:00 2001 +From 9581c22a253aebb72694e7f3277e1ec3934e917c Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 100/144] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 100/171] ARM64: Make it work again on 4.9 (#1790) * Invoke the dtc compiler with the same options used in arm mode. * ARM64 now uses the bcm2835 platform just like ARM32. @@ -113947,10 +113947,10 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From 8b99436bca01620f635619d18425a8b94a7059d0 Mon Sep 17 00:00:00 2001 +From 0e9d4384688dfbb5a2172134d82b57a309f3b6e4 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 -Subject: [PATCH 101/144] ARM64: Enable HDMI audio and vc04_services in +Subject: [PATCH 101/171] ARM64: Enable HDMI audio and vc04_services in bcmrpi3_defconfig Signed-off-by: Michael Zoran @@ -113979,10 +113979,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From 78b3bea38db0db0abb4b49504d7df320aa4eccf2 Mon Sep 17 00:00:00 2001 +From 58cd6558c922fc33dd2febca338ac9f8c39a33ea Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 -Subject: [PATCH 102/144] ARM64: Run bcmrpi3_defconfig through savedefconfig. +Subject: [PATCH 102/171] ARM64: Run bcmrpi3_defconfig through savedefconfig. Signed-off-by: Michael Zoran --- @@ -114027,10 +114027,10 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From 975a7ea28fbe652e50ce959baf6f1df8c4da072e Mon Sep 17 00:00:00 2001 +From f43de57cc7b56de56a5524bfc38fb7dd109038a4 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 103/144] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 103/171] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -114062,10 +114062,10 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From ce5c3897ec248b0387177d7960d491d2a772ba21 Mon Sep 17 00:00:00 2001 +From 07505003dce7fea2419e1ef88b62ee10417ce654 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 104/144] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 104/171] ARM64: Enable RTL8187/RTL8192CU wifi in build config These drivers build now, so they can be enabled back in the build configuration just like they are for @@ -114090,10 +114090,10 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From 8cbec32e706093cbab4c5fe4727fba6134547a35 Mon Sep 17 00:00:00 2001 +From 8875dc6bbfa16985e854d3f7093c0021d353c933 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 105/144] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 105/171] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 In ARM64, the FIQ mechanism used by this driver is not current implemented. As a workaround, reqular IRQ is used instead @@ -114436,10 +114436,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From 1011b9d3ecfa017dfe8cf53ddcdbd2019625cf2a Mon Sep 17 00:00:00 2001 +From aaf331898f4517057d3a766cabb9e97bfb6bfaba Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 106/144] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 106/171] ARM64: Round-Robin dispatch IRQs between CPUs. IRQ-CPU mapping is round robined on ARM64 to increase concurrency and allow multiple interrupts to be serviced @@ -114513,10 +114513,10 @@ index c4e151451cf8c8ebde5225515eac2786d6f61d46..9a7ee04ee0d9b7aa734cf3159ed59c19 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From 86f5c8ab47cb86f24d9e08a4198d20b94c139d22 Mon Sep 17 00:00:00 2001 +From c9a64004c5735b48b5170e9f9470c9d844b6e633 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 107/144] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 107/171] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -114537,10 +114537,10 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From 8baec59080f1e71432e0fe3c3217559a2126bfaa Mon Sep 17 00:00:00 2001 +From fd6756b15040d51b066e8e13aea594ffe202381d Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 -Subject: [PATCH 108/144] ARM64: Force hardware emulation of deprecated +Subject: [PATCH 108/171] ARM64: Force hardware emulation of deprecated instructions. --- @@ -114568,10 +114568,10 @@ index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From abd0109ca895f92e9de86029dd1282b547c3c9c4 Mon Sep 17 00:00:00 2001 +From e0e7606dc863810c5ed6c9c523b61e9cab6afdb2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 -Subject: [PATCH 109/144] build/arm64: Add rules for .dtbo files for dts +Subject: [PATCH 109/171] build/arm64: Add rules for .dtbo files for dts overlays We now create overlays as .dtbo files. @@ -114596,10 +114596,10 @@ index f839ecd919f934c54a73d8e9f8179aff3d3cba26..a4010b3cc8ef11d449bcff8018522667 dtbs: prepare scripts -From 2b8309f36e67834b3ecb7778e297ee9859a7683d Mon Sep 17 00:00:00 2001 +From 58394c288c349a81dcd637956008f7f986029690 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 110/144] clk: bcm2835: Mark GPIO clocks enabled at boot as +Subject: [PATCH 110/171] clk: bcm2835: Mark GPIO clocks enabled at boot as critical. These divide off of PLLD_PER and are used for the ethernet and wifi @@ -114637,10 +114637,10 @@ index 39f72da6ba1f6ec6ec41d5dc1bf46344aab008da..fe3298b54cdfb96bd90fb4f39e13921d * rate changes on at least of the parents. */ -From 095494de71e39407d2e4a895b1bac2fce416f518 Mon Sep 17 00:00:00 2001 +From 0ef189580cf32385a193a729ef6f5eac8133c390 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 111/144] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 111/171] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -114673,10 +114673,10 @@ index 6351fe7f8e314ac5ebb102dd20847b383fd5b857..28745af5aadf3cb91fa7ff39118385c3 }, }; -From 0bad64979a1e44b92f036ce7f63a63b2ad256242 Mon Sep 17 00:00:00 2001 +From 231de98a57e783d1661e93c339761b1a768dbffd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 -Subject: [PATCH 112/144] ASoC: Add prompt for ICS43432 codec +Subject: [PATCH 112/171] ASoC: Add prompt for ICS43432 codec Without a prompt string, a config setting can't be included in a defconfig. Give CONFIG_SND_SOC_ICS43432 a prompt so that Pi soundcards @@ -114701,10 +114701,10 @@ index adf3b7b75e303430d6a03a2b457d389596f39c1a..ba4a36dd0196e8eece5e22ad6717c189 config SND_SOC_INNO_RK3036 tristate "Inno codec driver for RK3036 SoC" -From c4ecc18897cf49cd2c946a6f05db65f1c8ef175c Mon Sep 17 00:00:00 2001 +From aa0d7cd8971ff12d2536d9583df90b9df8298d69 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 -Subject: [PATCH 113/144] bcm2835-aux: Add aux interrupt controller +Subject: [PATCH 113/171] bcm2835-aux: Add aux interrupt controller The AUX block has a shared interrupt line with a register indicating which devices have active IRQs. Expose this as a nested interrupt @@ -114868,10 +114868,10 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From 0ebc32b3c10779f4124aa10b8f41ad5c40e87e95 Mon Sep 17 00:00:00 2001 +From c282f9f93aae2c9fc600567281affdef1a425436 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 29 Apr 2016 10:32:17 -0700 -Subject: [PATCH 114/144] mmc: read mmc alias from device tree +Subject: [PATCH 114/171] mmc: read mmc alias from device tree To get the SD/MMC host device ID, read the alias from the device tree. @@ -114928,10 +114928,10 @@ index 3f8c85d5aa094b43666904c7dbbe5e62c9763c19..4dbd0e8e27a496bfbe67d188cf795ecc kfree(host); return NULL; -From 23f544ac61659b6fe1395b62c020f0a867be6a17 Mon Sep 17 00:00:00 2001 +From 1e9bbba01dbbd960eb54b7a6164f8ca558d43e27 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 May 2016 12:50:33 +0100 -Subject: [PATCH 115/144] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards +Subject: [PATCH 115/171] 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, @@ -115071,10 +115071,10 @@ index aad015e0152b7f1d32f92c500825b723498d1be9..d44a9c84a90a02388c05a427814fb8fc unsigned int erase_size; /* erase size in sectors */ -From 4ed7eb9ed18624427ea810f42784b61ca54da836 Mon Sep 17 00:00:00 2001 +From a724032fc4c905452e91e63700aeb377d0cedd36 Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 -Subject: [PATCH 116/144] This is the driver for Sony CXD2880 DVB-T2/T tuner + +Subject: [PATCH 116/171] This is the driver for Sony CXD2880 DVB-T2/T tuner + demodulator. It includes the CXD2880 driver and the CXD2880 SPI adapter. The current CXD2880 driver version is 1.4.1 - 1.0.1 released on April 13, 2017. @@ -131206,10 +131206,10 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From 32f3cb6921f4ade0a5a9d0d443d7146feb6953f9 Mon Sep 17 00:00:00 2001 +From a0e56c2ed506e86deeb9db7371801b1c82df43ad Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 117/144] raspberrypi-firmware: Define the MBOX channel in the +Subject: [PATCH 117/171] raspberrypi-firmware: Define the MBOX channel in the header. Signed-off-by: Eric Anholt @@ -131231,10 +131231,10 @@ index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e5586 enum rpi_firmware_property_status { -From 1ca011fc681c69a99230a4d31108ce56671ed74d Mon Sep 17 00:00:00 2001 +From 43827c87ca994ae688fc0946b486a1a4f7bffdac Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 118/144] raspberrypi-firmware: Export the general transaction +Subject: [PATCH 118/171] raspberrypi-firmware: Export the general transaction function. The vc4-firmware-kms module is going to be doing the MBOX FB call. @@ -131278,10 +131278,10 @@ index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1d #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From 4cd0e0fa69e63b19ce431aca9485d0868d3e8a2c Mon Sep 17 00:00:00 2001 +From d81430170878198cc623c1a2565cddf417bdc3ab Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 119/144] drm/vc4: Add a mode for using the closed firmware for +Subject: [PATCH 119/171] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -132054,10 +132054,10 @@ index 0000000000000000000000000000000000000000..1e09980c61a91246156c4ab661c03779 + }, +}; -From d04b76a9a185e8de8b718b4ffd69c409f9ef0e3c Mon Sep 17 00:00:00 2001 +From 954dc7a0536808a576770aadd5c00a6b6a62c785 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 -Subject: [PATCH 120/144] drm/vc4: Name the primary and cursor planes in fkms. +Subject: [PATCH 120/171] drm/vc4: Name the primary and cursor planes in fkms. This makes debugging nicer, compared to trying to remember what the IDs are. @@ -132081,10 +132081,10 @@ index 1e09980c61a91246156c4ab661c03779baa1fc97..174a2f90c5bd78798ed47cca243b68a9 if (type == DRM_PLANE_TYPE_PRIMARY) { vc4_plane->fbinfo = -From bec5889e4fe299f883288f0e1975525633df29fa Mon Sep 17 00:00:00 2001 +From 97944560aa49e696dfce604a51416ef62c156630 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 -Subject: [PATCH 121/144] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of +Subject: [PATCH 121/171] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms. Trying to debug weston on fkms involved figuring out what calls I was @@ -132154,10 +132154,10 @@ index 174a2f90c5bd78798ed47cca243b68a968e6e735..611a3c6d622deb9b511fe70c363d201b RPI_FIRMWARE_SET_CURSOR_STATE, &packet_state, -From f110b2755b432f4fbb0b79f747352340109c2e8c Mon Sep 17 00:00:00 2001 +From 5aca09df45741c4b230bd364aa411cb61993e1b6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 -Subject: [PATCH 122/144] drm/vc4: Fix sending of page flip completion events +Subject: [PATCH 122/171] drm/vc4: Fix sending of page flip completion events in FKMS mode. In the rewrite of vc4_crtc.c for fkms, I dropped the part of the @@ -132199,10 +132199,10 @@ index 611a3c6d622deb9b511fe70c363d201b091c414a..eb97443533c5a8fb5e142541adb1165b static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) -From bbf97c4e96d8379c66a7c1b8a98563588469519a Mon Sep 17 00:00:00 2001 +From 07c1450b5ac5a124aabef0d1cb4ea8489a4e9efb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 -Subject: [PATCH 123/144] vc4_fkms: Apply firmware overscan offset to hardware +Subject: [PATCH 123/171] vc4_fkms: Apply firmware overscan offset to hardware cursor --- @@ -132259,10 +132259,10 @@ index eb97443533c5a8fb5e142541adb1165b55e32aea..aa0ab7bcd904b775f64045c4d5baf39a return 0; -From b514d193f205ab0424e121441e344c7888495656 Mon Sep 17 00:00:00 2001 +From bf461c10dbd78d4cd803d20040fed48f02a54431 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 15 May 2017 09:28:36 -0700 -Subject: [PATCH 124/144] drm/vc4: Mark the device as active when enabling +Subject: [PATCH 124/171] drm/vc4: Mark the device as active when enabling runtime PM. Failing to do so meant that we got a resume() callback on first use of @@ -132288,10 +132288,10 @@ index 7cc346ad9b0baed63701d1fae8f0306aa7713129..c82326ff994d03719a66d42f8f9ac0e2 pm_runtime_set_autosuspend_delay(dev, 40); /* a little over 2 frames. */ pm_runtime_enable(dev); -From 3e7ebe133c45d79dde174198a10869c667b32cbc Mon Sep 17 00:00:00 2001 +From a88d8490c0d3f615e185a3a23b0db5407a34f1a0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 16 May 2017 14:39:49 +0100 -Subject: [PATCH 125/144] mmc: Change downstream MMC driver CONFIG option +Subject: [PATCH 125/171] mmc: Change downstream MMC driver CONFIG option The upstream SDHOST driver has now claimed CONFIG_MMC_BCM2835, which clashes with the downstream MMC driver. Rename the downstream option to @@ -132339,10 +132339,10 @@ index f4b8951af214fd0b0392d4fb38b29a0b41c7340e..d352fabf6b61c803fef3e10f974214bf obj-$(CONFIG_MMC_WBSD) += wbsd.o obj-$(CONFIG_MMC_AU1X) += au1xmmc.o -From 341feedcaae9013c2423a7b11e8267ba75b37f9a Mon Sep 17 00:00:00 2001 +From 8797af187c44ce214f2b5250631ca3606049da2e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 May 2017 19:34:52 +0100 -Subject: [PATCH 126/144] config: Add CONFIG_I2C_ROBOTFUZZ_OSIF +Subject: [PATCH 126/171] config: Add CONFIG_I2C_ROBOTFUZZ_OSIF --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132374,10 +132374,10 @@ index ace19d6f5bc04091130bd28b65ce25e863117a43..17952377907afac28fd982ca2f910206 CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m -From aced5bffe98507e67181cf9f1f0cda1873ddea31 Mon Sep 17 00:00:00 2001 +From 6c95279aa3a4b8ca4b067d4c0f9a445efc9f2a0a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 18 May 2017 11:40:43 +0100 -Subject: [PATCH 127/144] config: Add FB_TFT_ST7789V module +Subject: [PATCH 127/171] config: Add FB_TFT_ST7789V module --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132409,10 +132409,10 @@ index 17952377907afac28fd982ca2f9102067a062d6e..ef7bfc431c43eec6deb7c52e8cdac317 CONFIG_FB_TFT_TLS8204=m CONFIG_FB_TFT_UC1701=m -From 1c3372632d6ac1ad2599489fb1ec579b123372ef Mon Sep 17 00:00:00 2001 +From a20f8aa87b28c45181441f32f84b5f6b58b89dad Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 18 May 2017 15:36:46 +0100 -Subject: [PATCH 128/144] staging: bcm2835-audio: Fix memory corruption +Subject: [PATCH 128/171] staging: bcm2835-audio: Fix memory corruption I'm all for fixing memory leaks, but freeing a block while it is still being used is a recipe for hard-to-debug kernel exeptions. @@ -132447,10 +132447,10 @@ index 5f3d8f2339e34834d11edfa8de1d5819e3e32b4f..89f96f3c02805f4114ec9b488e18d00e return ret; } -From 6a78f3ee542be3cb657c007b024348ac98b209f5 Mon Sep 17 00:00:00 2001 +From 7f0ebb6e0287c4656db2caa57885c78289793a08 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 15 May 2017 16:40:05 +0100 -Subject: [PATCH 129/144] config: Add CONFIG_TOUCHSCREEN_GOODIX +Subject: [PATCH 129/171] config: Add CONFIG_TOUCHSCREEN_GOODIX --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132482,10 +132482,10 @@ index ef7bfc431c43eec6deb7c52e8cdac31794ccccbe..573cbd71ca0990b7a7e48fa3bbc98eec CONFIG_TOUCHSCREEN_RPI_FT5406=m CONFIG_TOUCHSCREEN_USB_COMPOSITE=m -From 01869744e94a76d433a940e1ab96cfbcb2a31922 Mon Sep 17 00:00:00 2001 +From fd626212989c9e5e426e30e2f5fdd7cc23de97ac Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 May 2017 15:58:00 +0100 -Subject: [PATCH 130/144] config: Add CONFIG_TOUCHSCREEN_EDT_FT5X06 +Subject: [PATCH 130/171] config: Add CONFIG_TOUCHSCREEN_EDT_FT5X06 --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132517,10 +132517,10 @@ index 573cbd71ca0990b7a7e48fa3bbc98eec2d3d776f..6c4d62cdea7e4ed642e265861c6f1c1a CONFIG_TOUCHSCREEN_USB_COMPOSITE=m CONFIG_TOUCHSCREEN_STMPE=m -From 5a552fff3f08d04974c8b400615b2ac8a7f39ac6 Mon Sep 17 00:00:00 2001 +From e4b9feed993ae1096693a59fd6a0b057ba038b89 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 22 May 2017 13:35:28 +0100 -Subject: [PATCH 131/144] config: Add CONFIG_IPV6_SIT_6RD +Subject: [PATCH 131/171] config: Add CONFIG_IPV6_SIT_6RD --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132552,10 +132552,10 @@ index 6c4d62cdea7e4ed642e265861c6f1c1a964e331c..676dfebfbab8f1cba521bc032b8d2137 CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_IPV6_SUBTREES=y -From 6305fda5a6b01e3f2f32c6137894bb45d12a5ea2 Mon Sep 17 00:00:00 2001 +From 0fb8a0728b9466d4f6265f88f28df1da81fa2a9f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 22 May 2017 15:28:27 +0100 -Subject: [PATCH 132/144] config: Add CONFIG_IPV6_ROUTE_INFO +Subject: [PATCH 132/171] config: Add CONFIG_IPV6_ROUTE_INFO --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -132587,10 +132587,10 @@ index 676dfebfbab8f1cba521bc032b8d21371c38abfa..4ae560370a972b9c56e8af38a537b1db CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m -From 4afbb0715994cab83ec1c6102659c8a2d166b675 Mon Sep 17 00:00:00 2001 +From 60c8e0676d5ee5c3a35ebfafa875484e17c365eb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 26 Apr 2017 17:28:47 +0100 -Subject: [PATCH 133/144] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER +Subject: [PATCH 133/171] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can @@ -132635,10 +132635,10 @@ index fe3298b54cdfb96bd90fb4f39e13921d2e1d4356..c24b4defb2b046e4ecdc109befc2b224 [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( .name = "pwm", -From 12ca9ed739b3c720bedc387fbfcd6c1d7a867817 Mon Sep 17 00:00:00 2001 +From bcb22e7e51e74f0424a60d3132eb8990b9572c9b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 22 May 2017 13:56:41 +0100 -Subject: [PATCH 134/144] clk: bcm2835: Minimise clock jitter for PCM clock +Subject: [PATCH 134/171] clk: bcm2835: Minimise clock jitter for PCM clock Fractional clock dividers generate accurate average frequencies but with jitter, particularly when the integer divisor is small. @@ -132763,10 +132763,10 @@ index c24b4defb2b046e4ecdc109befc2b22497060647..db3ba74acf78f4dfec0d2206b58bc7c3 .tcnt_mux = 23), [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( -From e72147d82163594e7c3a902d05c5accda5000f94 Mon Sep 17 00:00:00 2001 +From c5b41377f6623f3884178ba77c3f0905abab4fd4 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 25 May 2017 16:04:53 +0100 -Subject: [PATCH 135/144] dwc_otg: make periodic scheduling behave properly for +Subject: [PATCH 135/171] dwc_otg: make periodic scheduling behave properly for FS buses If the root port is in full-speed mode, transfer times at 12mbit/s @@ -132937,10 +132937,10 @@ index 85a6d431ca54b47dc10573aa72d1ad69d06f2e36..4b1dd9de99e9e08b2e006fb5f8a7ef92 status = check_max_xfer_size(hcd, qh); if (status) { -From 2b18a6fa1a643c27966f325c725b285b61ba2c8e Mon Sep 17 00:00:00 2001 +From dba872568a830087bbaf23bd11df5fc4c995a9c1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 19 May 2017 16:07:23 +0100 -Subject: [PATCH 136/144] serial: 8250: Add CAP_MINI, set for bcm2835aux +Subject: [PATCH 136/171] serial: 8250: Add CAP_MINI, set for bcm2835aux commit d087e7a991f1f61ee2c07db1be7c5cc2aa373f5d upstream. @@ -133013,10 +133013,10 @@ index 68fd045a7025047726860547ecd661b95d61ac80..af954e278d78002cc5d07086dcc69608 baud = serial8250_get_baud_rate(port, termios, old); -From 0fd4f795ba5cd3dd86fb438dea5fee205604c0d1 Mon Sep 17 00:00:00 2001 +From 58fa4f1c6cbcb0fe5751feb8730e9b881a3a91dc Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 26 May 2017 12:50:31 +0100 -Subject: [PATCH 137/144] dwc_otg: fiq_fsm: Make isochronous compatibility +Subject: [PATCH 137/171] dwc_otg: fiq_fsm: Make isochronous compatibility checks work properly Get rid of the spammy printk and local pointer mangling. @@ -133080,10 +133080,10 @@ index 38bf5fc792d32352f9e208e0e90f968599b9bc31..71834cf365e67d7ad995bba7869216c4 return 1; } -From 0f60b319719ee006955d679d61eac00998c914a5 Mon Sep 17 00:00:00 2001 +From 9fda46edc559c721e8a3e4355520064dc7f01e6b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 12 Jun 2017 13:05:43 +0100 -Subject: [PATCH 138/144] config: Add CONFIG_CAN_GS_USB +Subject: [PATCH 138/171] config: Add CONFIG_CAN_GS_USB --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -133115,10 +133115,10 @@ index 4ae560370a972b9c56e8af38a537b1dbebd5488a..8894ef2ed78968ea56d83d56ba4d770b CONFIG_IRLAN=m CONFIG_IRNET=m -From 12a1aabb380b8b41768d2d845e7092815de2d8be Mon Sep 17 00:00:00 2001 +From 5f95f4029635496e4e61e09ac16527f83df94330 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 12 Jun 2017 16:10:03 +0100 -Subject: [PATCH 139/144] dwc_otg: add module parameter int_ep_interval_min +Subject: [PATCH 139/171] dwc_otg: add module parameter int_ep_interval_min Add a module parameter (defaulting to ignored) that clamps the polling rate of high-speed Interrupt endpoints to a minimum microframe interval. @@ -133200,10 +133200,10 @@ index 4b1dd9de99e9e08b2e006fb5f8a7ef92f20c2553..fe8e8f841f03660c2ad49ab8e66193be DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD QH Initialized\n"); -From fe45bda4abe8094040366a2bf4c098cd99d0f497 Mon Sep 17 00:00:00 2001 +From 7ff66ca8713978900fece71bd4203caccb58c5fb Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 20 Jun 2017 13:44:01 +0100 -Subject: [PATCH 140/144] dwc_otg: fiq_fsm: Add non-periodic TT exclusivity +Subject: [PATCH 140/171] dwc_otg: fiq_fsm: Add non-periodic TT exclusivity constraints Certain hub types do not discriminate between pipe direction (IN or OUT) @@ -133370,10 +133370,10 @@ index 71834cf365e67d7ad995bba7869216c4091c3a74..7710370b30363e3170bf9bf522597c5f st->fsm = FIQ_PER_SSPLIT_STARTED; } else { -From 6244d244ba6c562d4825118cefe7a31796a49b93 Mon Sep 17 00:00:00 2001 +From e1854ee5ddf7552853ad7db0aaeea9efff405893 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 21 Jun 2017 17:19:04 +0100 -Subject: [PATCH 141/144] serial: 8250: Fix THRE flag usage for CAP_MINI +Subject: [PATCH 141/171] serial: 8250: Fix THRE flag usage for CAP_MINI The BCM2835 MINI UART has non-standard THRE semantics. Conventionally the bit means that the FIFO is empty (although there may still be a @@ -133417,10 +133417,10 @@ index af954e278d78002cc5d07086dcc69608ac3019ee..877b1a848b5a44e196cab5bfd435467b if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) -From ca600c19c8e4c6c98ad2be24c720d8348a950319 Mon Sep 17 00:00:00 2001 +From c170fbc1fd3a2a5a74b4925968ed06e3306d47a5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 26 May 2017 13:03:41 +0100 -Subject: [PATCH 142/144] BCM270X_DT: Add midi-uart1 overlay +Subject: [PATCH 142/171] BCM270X_DT: Add midi-uart1 overlay Add a scaler to the ttyS0 clock so that requesting 38400 baud results in an approximately 31250 baud signal. This is analagous to @@ -133518,10 +133518,10 @@ index 0000000000000000000000000000000000000000..e0bc410acbff3a7a175dd5d53b3ab0d0 + }; +}; -From ccbc348a882e70d41ba1722893b7574ffb4d3566 Mon Sep 17 00:00:00 2001 +From f84f5b73c83be7f7d02c2ef2107f6a4e189b14a4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 20 May 2017 22:10:14 +0100 -Subject: [PATCH 143/144] overlays: README: remove vestigial SDIO parameters +Subject: [PATCH 143/171] overlays: README: remove vestigial SDIO parameters Signed-off-by: Phil Elwell --- @@ -133575,10 +133575,10 @@ index ec9e7b1941678796facf625b3770c20ed0b15b25..499cd1920fd373702cfbc9f6e0fcaebc (default on: polling once at boot-time) -From 47b5ae3bff25d36110986d46f77b5900cbedeca3 Mon Sep 17 00:00:00 2001 +From 03d7912b599cd5cf5385de4ee4906afa1bde99e1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 27 Jun 2017 15:07:14 +0100 -Subject: [PATCH 144/144] SQUASH: mmc: Apply ERASE_BROKEN quirks correctly +Subject: [PATCH 144/171] SQUASH: mmc: Apply ERASE_BROKEN quirks correctly Squash with: mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards @@ -133607,3 +133607,3345 @@ index 05c8d7381fff5ae88531129d9a5ddd554bddb43e..c9d5d644688c1509d7febcff0322fbab END_FIXUP }; + +From f8cd81d2c4579f411fd5b5c48ee95c800ccfc963 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sun, 7 May 2017 11:34:26 +0200 +Subject: [PATCH 145/171] ASoC: bcm2835: Add support for TDM modes + +bcm2835 supports arbitrary positioning of channel data within +a frame and thus is capable of supporting TDM modes. Since +the driver is limited to 2-channel operations only TDM setups +with exactly 2 active slots are supported. + +Logical TDM slot numbering follows the usual convention: + +For I2S-like modes, with a 50% duty-cycle frame clock, +slots 0, 2, ... are transmitted in the first half of a frame, +slots 1, 3, ... are transmitted in the second half. + +For DSP modes slot numbering is ascending: 0, 1, 2, 3, ... + +Channel position calculation has been refactored to use +TDM info and moved out of hw_params. + +set_tdm_slot, set_bclk_ratio and hw_params now check more +strictly if the configuration is valid. Illegal configurations +like odd number of slots in I2S mode, data lengths exceeding +slot width or frame sizes larger than the hardware limit of +1024 are rejected. Also hw_params now properly checks for +errors from clk_set_rate. + +Allowed PCM formats are already guarded by stream constraints, +thus the formats check in hw_params has been removed and +data_length is now retrieved via params_width(). + +Also standard functions like snd_soc_params_to_bclk are now +being used instead of manual calculations to make the code +more readable. + +Special care has been taken to ensure that set_bclk_ratio works +as before. The bclk ratio is mapped to a 2-channel TDM config +with a slot width of half the ratio. In order to support odd ratios, +which can't be expressed via a TDM config, the ratio (frame length) +is stored and used by hw_params. + +Signed-off-by: Matthias Reichl +--- + sound/soc/bcm/bcm2835-i2s.c | 243 ++++++++++++++++++++++++++++++++++---------- + 1 file changed, 190 insertions(+), 53 deletions(-) + +diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c +index 56df7d8a43d0aac055a91b0d24aca8e1b4e308e4..dcacf7f83c9371df539a788ea33fedcf97d64690 100644 +--- a/sound/soc/bcm/bcm2835-i2s.c ++++ b/sound/soc/bcm/bcm2835-i2s.c +@@ -31,6 +31,7 @@ + * General Public License for more details. + */ + ++#include + #include + #include + #include +@@ -99,6 +100,8 @@ + #define BCM2835_I2S_CHWID(v) (v) + #define BCM2835_I2S_CH1(v) ((v) << 16) + #define BCM2835_I2S_CH2(v) (v) ++#define BCM2835_I2S_CH1_POS(v) BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(v)) ++#define BCM2835_I2S_CH2_POS(v) BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(v)) + + #define BCM2835_I2S_TX_PANIC(v) ((v) << 24) + #define BCM2835_I2S_RX_PANIC(v) ((v) << 16) +@@ -110,12 +113,19 @@ + #define BCM2835_I2S_INT_RXR BIT(1) + #define BCM2835_I2S_INT_TXW BIT(0) + ++/* Frame length register is 10 bit, maximum length 1024 */ ++#define BCM2835_I2S_MAX_FRAME_LENGTH 1024 ++ + /* General device struct */ + struct bcm2835_i2s_dev { + struct device *dev; + struct snd_dmaengine_dai_dma_data dma_data[2]; + unsigned int fmt; +- unsigned int bclk_ratio; ++ unsigned int tdm_slots; ++ unsigned int rx_mask; ++ unsigned int tx_mask; ++ unsigned int slot_width; ++ unsigned int frame_length; + + struct regmap *i2s_regmap; + struct clk *clk; +@@ -225,19 +235,117 @@ static int bcm2835_i2s_set_dai_bclk_ratio(struct snd_soc_dai *dai, + unsigned int ratio) + { + struct bcm2835_i2s_dev *dev = snd_soc_dai_get_drvdata(dai); +- dev->bclk_ratio = ratio; ++ ++ if (!ratio) { ++ dev->tdm_slots = 0; ++ return 0; ++ } ++ ++ if (ratio > BCM2835_I2S_MAX_FRAME_LENGTH) ++ return -EINVAL; ++ ++ dev->tdm_slots = 2; ++ dev->rx_mask = 0x03; ++ dev->tx_mask = 0x03; ++ dev->slot_width = ratio / 2; ++ dev->frame_length = ratio; ++ ++ return 0; ++} ++ ++static int bcm2835_i2s_set_dai_tdm_slot(struct snd_soc_dai *dai, ++ unsigned int tx_mask, unsigned int rx_mask, ++ int slots, int width) ++{ ++ struct bcm2835_i2s_dev *dev = snd_soc_dai_get_drvdata(dai); ++ ++ if (slots) { ++ if (slots < 0 || width < 0) ++ return -EINVAL; ++ ++ /* Limit masks to available slots */ ++ rx_mask &= GENMASK(slots - 1, 0); ++ tx_mask &= GENMASK(slots - 1, 0); ++ ++ /* ++ * The driver is limited to 2-channel setups. ++ * Check that exactly 2 bits are set in the masks. ++ */ ++ if (hweight_long((unsigned long) rx_mask) != 2 ++ || hweight_long((unsigned long) tx_mask) != 2) ++ return -EINVAL; ++ ++ if (slots * width > BCM2835_I2S_MAX_FRAME_LENGTH) ++ return -EINVAL; ++ } ++ ++ dev->tdm_slots = slots; ++ ++ dev->rx_mask = rx_mask; ++ dev->tx_mask = tx_mask; ++ dev->slot_width = width; ++ dev->frame_length = slots * width; ++ + return 0; + } + ++/* ++ * Convert logical slot number into physical slot number. ++ * ++ * If odd_offset is 0 sequential number is identical to logical number. ++ * This is used for DSP modes with slot numbering 0 1 2 3 ... ++ * ++ * Otherwise odd_offset defines the physical offset for odd numbered ++ * slots. This is used for I2S and left/right justified modes to ++ * translate from logical slot numbers 0 1 2 3 ... into physical slot ++ * numbers 0 2 ... 3 4 ... ++ */ ++static int bcm2835_i2s_convert_slot(unsigned int slot, unsigned int odd_offset) ++{ ++ if (!odd_offset) ++ return slot; ++ ++ if (slot & 1) ++ return (slot >> 1) + odd_offset; ++ ++ return slot >> 1; ++} ++ ++/* ++ * Calculate channel position from mask and slot width. ++ * ++ * Mask must contain exactly 2 set bits. ++ * Lowest set bit is channel 1 position, highest set bit channel 2. ++ * The constant offset is added to both channel positions. ++ * ++ * If odd_offset is > 0 slot positions are translated to ++ * I2S-style TDM slot numbering ( 0 2 ... 3 4 ...) with odd ++ * logical slot numbers starting at physical slot odd_offset. ++ */ ++static void bcm2835_i2s_calc_channel_pos( ++ unsigned int *ch1_pos, unsigned int *ch2_pos, ++ unsigned int mask, unsigned int width, ++ unsigned int bit_offset, unsigned int odd_offset) ++{ ++ *ch1_pos = bcm2835_i2s_convert_slot((ffs(mask) - 1), odd_offset) ++ * width + bit_offset; ++ *ch2_pos = bcm2835_i2s_convert_slot((fls(mask) - 1), odd_offset) ++ * width + bit_offset; ++} ++ + static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params, + 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 data_length, data_delay, framesync_length; ++ unsigned int slots, slot_width, odd_slot_offset; ++ int frame_length, bclk_rate; ++ unsigned int rx_mask, tx_mask; ++ unsigned int rx_ch1_pos, rx_ch2_pos, tx_ch1_pos, tx_ch2_pos; ++ unsigned int mode, format; + uint32_t csreg; ++ int ret = 0; + + /* + * If a stream is already enabled, +@@ -248,39 +356,44 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + if (csreg & (BCM2835_I2S_TXON | BCM2835_I2S_RXON)) + return 0; + +- /* +- * Adjust the data length according to the format. +- * We prefill the half frame length with an integer +- * divider of 2400 as explained at the clock settings. +- * Maybe it is overwritten there, if the Integer mode +- * does not apply. +- */ +- switch (params_format(params)) { +- 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; +- default: +- return -EINVAL; ++ data_length = params_width(params); ++ data_delay = 0; ++ odd_slot_offset = 0; ++ mode = 0; ++ ++ if (dev->tdm_slots) { ++ slots = dev->tdm_slots; ++ slot_width = dev->slot_width; ++ frame_length = dev->frame_length; ++ rx_mask = dev->rx_mask; ++ tx_mask = dev->tx_mask; ++ bclk_rate = dev->frame_length * params_rate(params); ++ } else { ++ slots = 2; ++ slot_width = params_width(params); ++ rx_mask = 0x03; ++ tx_mask = 0x03; ++ ++ frame_length = snd_soc_params_to_frame_size(params); ++ if (frame_length < 0) ++ return frame_length; ++ ++ bclk_rate = snd_soc_params_to_bclk(params); ++ if (bclk_rate < 0) ++ return bclk_rate; + } + +- /* 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; ++ /* Check if data fits into slots */ ++ if (data_length > slot_width) ++ return -EINVAL; + + /* 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); ++ ret = clk_set_rate(dev->clk, bclk_rate); ++ if (ret) ++ return ret; + break; + default: + break; +@@ -294,9 +407,26 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + + format |= BCM2835_I2S_CHWID((data_length-8)&0xf); + ++ /* CH2 format is the same as for CH1 */ ++ format = BCM2835_I2S_CH1(format) | BCM2835_I2S_CH2(format); ++ + switch (dev->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_I2S: ++ /* I2S mode needs an even number of slots */ ++ if (slots & 1) ++ return -EINVAL; ++ ++ /* ++ * Use I2S-style logical slot numbering: even slots ++ * are in first half of frame, odd slots in second half. ++ */ ++ odd_slot_offset = slots >> 1; ++ ++ /* MSB starts one cycle after frame start */ + data_delay = 1; ++ ++ /* Setup frame sync signal for 50% duty cycle */ ++ framesync_length = frame_length / 2; + break; + default: + /* +@@ -307,19 +437,10 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + return -EINVAL; + } + +- ch1pos = data_delay; +- ch2pos = bclk_ratio / 2 + data_delay; +- +- switch (params_channels(params)) { +- case 2: +- case 8: +- format = BCM2835_I2S_CH1(format) | BCM2835_I2S_CH2(format); +- format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); +- format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); +- break; +- default: +- return -EINVAL; +- } ++ bcm2835_i2s_calc_channel_pos(&rx_ch1_pos, &rx_ch2_pos, ++ rx_mask, slot_width, data_delay, odd_slot_offset); ++ bcm2835_i2s_calc_channel_pos(&tx_ch1_pos, &tx_ch2_pos, ++ tx_mask, slot_width, data_delay, odd_slot_offset); + + /* + * Set format for both streams. +@@ -327,11 +448,16 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + * (and therefore word length) anyway, + * so the format will be the same. + */ +- regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); +- regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); ++ regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, ++ format ++ | BCM2835_I2S_CH1_POS(rx_ch1_pos) ++ | BCM2835_I2S_CH2_POS(rx_ch2_pos)); ++ regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, ++ format ++ | BCM2835_I2S_CH1_POS(tx_ch1_pos) ++ | BCM2835_I2S_CH2_POS(tx_ch2_pos)); + + /* Setup the I2S mode */ +- mode = 0; + + if (data_length <= 16) { + /* +@@ -343,8 +469,8 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + mode |= BCM2835_I2S_FTXP | BCM2835_I2S_FRXP; + } + +- mode |= BCM2835_I2S_FLEN(bclk_ratio - 1); +- mode |= BCM2835_I2S_FSLEN(bclk_ratio / 2); ++ mode |= BCM2835_I2S_FLEN(frame_length - 1); ++ mode |= BCM2835_I2S_FSLEN(framesync_length); + + /* Master or slave? */ + switch (dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) { +@@ -424,7 +550,20 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + /* Clear FIFOs */ + bcm2835_i2s_clear_fifos(dev, true, true); + +- return 0; ++ dev_dbg(dev->dev, ++ "slots: %d width: %d rx mask: 0x%02x tx_mask: 0x%02x\n", ++ slots, slot_width, rx_mask, tx_mask); ++ ++ dev_dbg(dev->dev, "frame len: %d sync len: %d data len: %d\n", ++ frame_length, framesync_length, data_length); ++ ++ dev_dbg(dev->dev, "rx pos: %d,%d tx pos: %d,%d\n", ++ rx_ch1_pos, rx_ch2_pos, tx_ch1_pos, tx_ch2_pos); ++ ++ dev_dbg(dev->dev, "sampling rate: %d bclk rate: %d\n", ++ params_rate(params), bclk_rate); ++ ++ return ret; + } + + static int bcm2835_i2s_prepare(struct snd_pcm_substream *substream, +@@ -560,6 +699,7 @@ static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = { + .hw_params = bcm2835_i2s_hw_params, + .set_fmt = bcm2835_i2s_set_dai_fmt, + .set_bclk_ratio = bcm2835_i2s_set_dai_bclk_ratio, ++ .set_tdm_slot = bcm2835_i2s_set_dai_tdm_slot, + }; + + static int bcm2835_i2s_dai_probe(struct snd_soc_dai *dai) +@@ -700,9 +840,6 @@ static int bcm2835_i2s_probe(struct platform_device *pdev) + dev->dma_data[SNDRV_PCM_STREAM_CAPTURE].flags = + SND_DMAENGINE_PCM_DAI_FLAG_PACK; + +- /* BCLK ratio - use default */ +- dev->bclk_ratio = 0; +- + /* Store the pdev */ + dev->dev = &pdev->dev; + dev_set_drvdata(&pdev->dev, dev); + +From 7db713fa27c37fe4f585df0282086082e0c71e25 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sun, 7 May 2017 15:30:50 +0200 +Subject: [PATCH 146/171] ASoC: bcm2835: Support left/right justified and DSP + modes + +DSP modes and left/right justified modes can be supported +on bcm2835 by configuring the frame sync polarity and +frame sync length registers and by adjusting the +channel data position registers. + +Clock and frame sync polarity handling in hw_params has +been refactored to make the interaction between logical +rising/falling edge frame start and physical configuration +(changed by normal/inverted polarity modes) clearer. + +Modes where the first active data bit is transmitted immediately +after frame start (eg DSP mode B with slot 0 active) +only work reliable if bcm2835 is configured as frame master. +In frame slave mode channel swap (or shift, this isn't quite +clear yet) can occur. + +Currently the driver only warns if an unstable configuration +is detected but doensn't prevent using them. + +Signed-off-by: Matthias Reichl +--- + sound/soc/bcm/bcm2835-i2s.c | 152 +++++++++++++++++++++++++++++--------------- + 1 file changed, 99 insertions(+), 53 deletions(-) + +diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c +index dcacf7f83c9371df539a788ea33fedcf97d64690..3a706fda4f39e42efbe12f19d87af9b100a348a5 100644 +--- a/sound/soc/bcm/bcm2835-i2s.c ++++ b/sound/soc/bcm/bcm2835-i2s.c +@@ -344,6 +344,9 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + unsigned int rx_mask, tx_mask; + unsigned int rx_ch1_pos, rx_ch2_pos, tx_ch1_pos, tx_ch2_pos; + unsigned int mode, format; ++ bool bit_clock_master = false; ++ bool frame_sync_master = false; ++ bool frame_start_falling_edge = false; + uint32_t csreg; + int ret = 0; + +@@ -387,16 +390,39 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + if (data_length > slot_width) + return -EINVAL; + +- /* Clock should only be set up here if CPU is clock master */ ++ /* Check if CPU is bit clock master */ + switch (dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBS_CFS: + case SND_SOC_DAIFMT_CBS_CFM: +- ret = clk_set_rate(dev->clk, bclk_rate); +- if (ret) +- return ret; ++ bit_clock_master = true; ++ break; ++ case SND_SOC_DAIFMT_CBM_CFS: ++ case SND_SOC_DAIFMT_CBM_CFM: ++ bit_clock_master = false; + break; + default: ++ return -EINVAL; ++ } ++ ++ /* Check if CPU is frame sync master */ ++ switch (dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) { ++ case SND_SOC_DAIFMT_CBS_CFS: ++ case SND_SOC_DAIFMT_CBM_CFS: ++ frame_sync_master = true; ++ break; ++ case SND_SOC_DAIFMT_CBS_CFM: ++ case SND_SOC_DAIFMT_CBM_CFM: ++ frame_sync_master = false; + break; ++ default: ++ return -EINVAL; ++ } ++ ++ /* Clock should only be set up here if CPU is clock master */ ++ if (bit_clock_master) { ++ ret = clk_set_rate(dev->clk, bclk_rate); ++ if (ret) ++ return ret; + } + + /* Setup the frame format */ +@@ -427,13 +453,41 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + + /* Setup frame sync signal for 50% duty cycle */ + framesync_length = frame_length / 2; ++ frame_start_falling_edge = true; ++ break; ++ case SND_SOC_DAIFMT_LEFT_J: ++ if (slots & 1) ++ return -EINVAL; ++ ++ odd_slot_offset = slots >> 1; ++ data_delay = 0; ++ framesync_length = frame_length / 2; ++ frame_start_falling_edge = false; ++ break; ++ case SND_SOC_DAIFMT_RIGHT_J: ++ if (slots & 1) ++ return -EINVAL; ++ ++ /* Odd frame lengths aren't supported */ ++ if (frame_length & 1) ++ return -EINVAL; ++ ++ odd_slot_offset = slots >> 1; ++ data_delay = slot_width - data_length; ++ framesync_length = frame_length / 2; ++ frame_start_falling_edge = false; ++ break; ++ case SND_SOC_DAIFMT_DSP_A: ++ data_delay = 1; ++ framesync_length = 1; ++ frame_start_falling_edge = false; ++ break; ++ case SND_SOC_DAIFMT_DSP_B: ++ data_delay = 0; ++ framesync_length = 1; ++ frame_start_falling_edge = false; + break; + default: +- /* +- * TODO +- * Others are possible but are not implemented at the moment. +- */ +- dev_err(dev->dev, "%s:bad format\n", __func__); + return -EINVAL; + } + +@@ -443,6 +497,15 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + tx_mask, slot_width, data_delay, odd_slot_offset); + + /* ++ * Transmitting data immediately after frame start, eg ++ * in left-justified or DSP mode A, only works stable ++ * if bcm2835 is the frame clock master. ++ */ ++ if ((!rx_ch1_pos || !tx_ch1_pos) && !frame_sync_master) ++ dev_warn(dev->dev, ++ "Unstable slave config detected, L/R may be swapped"); ++ ++ /* + * Set format for both streams. + * We cannot set another frame length + * (and therefore word length) anyway, +@@ -472,62 +535,38 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + mode |= BCM2835_I2S_FLEN(frame_length - 1); + mode |= BCM2835_I2S_FSLEN(framesync_length); + +- /* Master or slave? */ +- switch (dev->fmt & SND_SOC_DAIFMT_MASTER_MASK) { +- case SND_SOC_DAIFMT_CBS_CFS: +- /* CPU is master */ +- break; +- case SND_SOC_DAIFMT_CBM_CFS: +- /* +- * CODEC is bit clock master +- * CPU is frame master +- */ ++ /* CLKM selects bcm2835 clock slave mode */ ++ if (!bit_clock_master) + mode |= BCM2835_I2S_CLKM; +- break; +- case SND_SOC_DAIFMT_CBS_CFM: +- /* +- * CODEC is frame master +- * CPU is bit clock master +- */ ++ ++ /* FSM selects bcm2835 frame sync slave mode */ ++ if (!frame_sync_master) + mode |= BCM2835_I2S_FSM; ++ ++ /* CLKI selects normal clocking mode, sampling on rising edge */ ++ switch (dev->fmt & SND_SOC_DAIFMT_INV_MASK) { ++ case SND_SOC_DAIFMT_NB_NF: ++ case SND_SOC_DAIFMT_NB_IF: ++ mode |= BCM2835_I2S_CLKI; + break; +- case SND_SOC_DAIFMT_CBM_CFM: +- /* CODEC is master */ +- mode |= BCM2835_I2S_CLKM; +- mode |= BCM2835_I2S_FSM; ++ case SND_SOC_DAIFMT_IB_NF: ++ case SND_SOC_DAIFMT_IB_IF: + break; + default: +- dev_err(dev->dev, "%s:bad master\n", __func__); + return -EINVAL; + } + +- /* +- * Invert clocks? +- * +- * The BCM approach seems to be inverted to the classical I2S approach. +- */ ++ /* FSI selects frame start on falling edge */ + switch (dev->fmt & SND_SOC_DAIFMT_INV_MASK) { + case SND_SOC_DAIFMT_NB_NF: +- /* None. Therefore, both for BCM */ +- mode |= BCM2835_I2S_CLKI; +- mode |= BCM2835_I2S_FSI; +- break; +- case SND_SOC_DAIFMT_IB_IF: +- /* Both. Therefore, none for BCM */ ++ case SND_SOC_DAIFMT_IB_NF: ++ if (frame_start_falling_edge) ++ mode |= BCM2835_I2S_FSI; + break; + case SND_SOC_DAIFMT_NB_IF: +- /* +- * Invert only frame sync. Therefore, +- * invert only bit clock for BCM +- */ +- mode |= BCM2835_I2S_CLKI; +- break; +- case SND_SOC_DAIFMT_IB_NF: +- /* +- * Invert only bit clock. Therefore, +- * invert only frame sync for BCM +- */ +- mode |= BCM2835_I2S_FSI; ++ case SND_SOC_DAIFMT_IB_IF: ++ if (!frame_start_falling_edge) ++ mode |= BCM2835_I2S_FSI; + break; + default: + return -EINVAL; +@@ -563,6 +602,13 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, + dev_dbg(dev->dev, "sampling rate: %d bclk rate: %d\n", + params_rate(params), bclk_rate); + ++ dev_dbg(dev->dev, "CLKM: %d CLKI: %d FSM: %d FSI: %d frame start: %s edge\n", ++ !!(mode & BCM2835_I2S_CLKM), ++ !!(mode & BCM2835_I2S_CLKI), ++ !!(mode & BCM2835_I2S_FSM), ++ !!(mode & BCM2835_I2S_FSI), ++ (mode & BCM2835_I2S_FSI) ? "falling" : "rising"); ++ + return ret; + } + + +From 36ac9ead94b9144353b3c1d47fdede2246b24fe0 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sun, 7 May 2017 16:19:54 +0200 +Subject: [PATCH 147/171] ASoC: bcm2835: Support additional samplerates up to + 384kHz + +Sample rates are only restricted by the capabilities of the +clock driver, so use SNDRV_PCM_RATE_CONTINUOUS instead of +SNDRV_PCM_RATE_8000_192000. + +Tests (eg with pcm5122) have shown that bcm2835 works fine +in 384kHz/32bit stereo mode, so change the maximum allowed +rate from 192kHz to 384kHz. + +Signed-off-by: Matthias Reichl +--- + sound/soc/bcm/bcm2835-i2s.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c +index 3a706fda4f39e42efbe12f19d87af9b100a348a5..43f5715a0d5dda851731ecf7ff27e76c48fb6e57 100644 +--- a/sound/soc/bcm/bcm2835-i2s.c ++++ b/sound/soc/bcm/bcm2835-i2s.c +@@ -765,7 +765,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { + .playback = { + .channels_min = 2, + .channels_max = 2, +- .rates = SNDRV_PCM_RATE_8000_192000, ++ .rates = SNDRV_PCM_RATE_CONTINUOUS, ++ .rate_min = 8000, ++ .rate_max = 384000, + .formats = SNDRV_PCM_FMTBIT_S16_LE + | SNDRV_PCM_FMTBIT_S24_LE + | SNDRV_PCM_FMTBIT_S32_LE +@@ -773,7 +775,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { + .capture = { + .channels_min = 2, + .channels_max = 2, +- .rates = SNDRV_PCM_RATE_8000_192000, ++ .rates = SNDRV_PCM_RATE_CONTINUOUS, ++ .rate_min = 8000, ++ .rate_max = 384000, + .formats = SNDRV_PCM_FMTBIT_S16_LE + | SNDRV_PCM_FMTBIT_S24_LE + | SNDRV_PCM_FMTBIT_S32_LE + +From ef66e7de78c4d2a9ca03f117120c5a1cdc30ce7c Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sun, 7 May 2017 16:24:57 +0200 +Subject: [PATCH 148/171] ASoC: bcm2835: Enforce full symmetry + +bcm2835's configuration registers can't be changed when a stream +is running, which means asymmetric configurations aren't supported. + +Channel and rate symmetry are already enforced by constraints +but samplebits had been missed. + +As hw_params doesn't check for symmetry constraints by itself +and just returns success if a stream is running this led to +situations where asymmetric configurations were seeming to +succeed but of course didn't work because the hardware wasn't +configured at all. + +Fix this by adding the missing samplerate symmetry constraint. + +Signed-off-by: Matthias Reichl +--- + sound/soc/bcm/bcm2835-i2s.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c +index 43f5715a0d5dda851731ecf7ff27e76c48fb6e57..2e449d7173fcecbcd647f90a26bd58b6c421bcde 100644 +--- a/sound/soc/bcm/bcm2835-i2s.c ++++ b/sound/soc/bcm/bcm2835-i2s.c +@@ -783,7 +783,8 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { + | SNDRV_PCM_FMTBIT_S32_LE + }, + .ops = &bcm2835_i2s_dai_ops, +- .symmetric_rates = 1 ++ .symmetric_rates = 1, ++ .symmetric_samplebits = 1, + }; + + static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg) + +From b5148a35aef4ec05c2a37c0bd4f616ba8d9612a8 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Thu, 6 Jul 2017 18:52:16 +0200 +Subject: [PATCH 149/171] config: add missing arizona regulator modules + +In kernel 4.12 CONFIG_REGULATOR_ARIZONA was replaced by 2 separate +options for LDO1 and MICSUPP regulators. Enable these, they are +needed by the Cirrus Logic Audio Card. + +Also regenerate configs with make savedefconfig to get rid of +the duplicated CONFIG_TOUCHSCREEN_EDT_FT5X06 entry. + +Signed-off-by: Matthias Reichl +--- + arch/arm/configs/bcm2709_defconfig | 3 ++- + arch/arm/configs/bcmrpi_defconfig | 2 ++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 5b0f11690132f4ac3fe936b409ef79c188b3ac85..822fa346cfdd35713e395433f1d6b9146af0dd4e 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -568,7 +568,6 @@ CONFIG_JOYSTICK_RPISENSE=m + CONFIG_INPUT_TOUCHSCREEN=y + CONFIG_TOUCHSCREEN_ADS7846=m + CONFIG_TOUCHSCREEN_EGALAX=m +-CONFIG_TOUCHSCREEN_EDT_FT5X06=m + CONFIG_TOUCHSCREEN_GOODIX=m + CONFIG_TOUCHSCREEN_EDT_FT5X06=m + CONFIG_TOUCHSCREEN_RPI_FT5406=m +@@ -670,6 +669,8 @@ CONFIG_MFD_ARIZONA_SPI=m + CONFIG_MFD_WM5102=y + CONFIG_REGULATOR=y + CONFIG_REGULATOR_FIXED_VOLTAGE=m ++CONFIG_REGULATOR_ARIZONA_LDO1=m ++CONFIG_REGULATOR_ARIZONA_MICSUPP=m + CONFIG_MEDIA_SUPPORT=m + CONFIG_MEDIA_CAMERA_SUPPORT=y + CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 8894ef2ed78968ea56d83d56ba4d770b45bba5c2..7362d1a6e5759e45ebef3ba84a4454b86e69a901 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -663,6 +663,8 @@ CONFIG_MFD_ARIZONA_SPI=m + CONFIG_MFD_WM5102=y + CONFIG_REGULATOR=y + CONFIG_REGULATOR_FIXED_VOLTAGE=m ++CONFIG_REGULATOR_ARIZONA_LDO1=m ++CONFIG_REGULATOR_ARIZONA_MICSUPP=m + CONFIG_MEDIA_SUPPORT=m + CONFIG_MEDIA_CAMERA_SUPPORT=y + CONFIG_MEDIA_ANALOG_TV_SUPPORT=y + +From 9538e78fe8f46df88df55893ba333be72be7e476 Mon Sep 17 00:00:00 2001 +From: Matt Flax +Date: Tue, 4 Apr 2017 19:20:59 +1000 +Subject: [PATCH 150/171] Audioinjector : make the octo and pi sound cards have + different driver names + +This patch gives the audioinjector octo and pi soundcards different driver +names. This allows both the be loaded without clashing. +--- + sound/soc/bcm/audioinjector-octo-soundcard.c | 2 +- + sound/soc/bcm/audioinjector-pi-soundcard.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/bcm/audioinjector-octo-soundcard.c b/sound/soc/bcm/audioinjector-octo-soundcard.c +index dcf403ab37639ba79e38278d7e4b1ade452c292a..49115c8e20ce1a2ba5a99feb8983a1cafb052ca2 100644 +--- a/sound/soc/bcm/audioinjector-octo-soundcard.c ++++ b/sound/soc/bcm/audioinjector-octo-soundcard.c +@@ -324,7 +324,7 @@ MODULE_DEVICE_TABLE(of, audioinjector_octo_of_match); + + static struct platform_driver audioinjector_octo_driver = { + .driver = { +- .name = "audioinjector-audio", ++ .name = "audioinjector-octo", + .owner = THIS_MODULE, + .of_match_table = audioinjector_octo_of_match, + }, +diff --git a/sound/soc/bcm/audioinjector-pi-soundcard.c b/sound/soc/bcm/audioinjector-pi-soundcard.c +index ef54e0f07ea03f59e9957b5d98f3e7fdc998e469..491906bbf446826e55dd843f28e4860f48e908b8 100644 +--- a/sound/soc/bcm/audioinjector-pi-soundcard.c ++++ b/sound/soc/bcm/audioinjector-pi-soundcard.c +@@ -177,7 +177,7 @@ MODULE_DEVICE_TABLE(of, audioinjector_pi_soundcard_of_match); + + static struct platform_driver audioinjector_pi_soundcard_driver = { + .driver = { +- .name = "audioinjector-audio", ++ .name = "audioinjector-stereo", + .owner = THIS_MODULE, + .of_match_table = audioinjector_pi_soundcard_of_match, + }, + +From a80fd6a05e1948659d9f484f8fb27d88f01f1134 Mon Sep 17 00:00:00 2001 +From: Matt Flax +Date: Tue, 4 Apr 2017 19:23:04 +1000 +Subject: [PATCH 151/171] Audioinjector octo : Make the playback and capture + symmetric + +This patch ensures that the sample rate and channel count of the audioinjector +octo sound card are symmetric. +--- + sound/soc/bcm/audioinjector-octo-soundcard.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sound/soc/bcm/audioinjector-octo-soundcard.c b/sound/soc/bcm/audioinjector-octo-soundcard.c +index 49115c8e20ce1a2ba5a99feb8983a1cafb052ca2..5e79f4eff93a21ed3495c77a90f73525695cb3d5 100644 +--- a/sound/soc/bcm/audioinjector-octo-soundcard.c ++++ b/sound/soc/bcm/audioinjector-octo-soundcard.c +@@ -204,6 +204,8 @@ static struct snd_soc_dai_link audioinjector_octo_dai[] = { + .codec_dai_name = "cs42448", + .ops = &audioinjector_octo_ops, + .init = audioinjector_octo_dai_init, ++ .symmetric_rates = 1, ++ .symmetric_channels = 1, + }, + }; + + +From 91b906da5bd96cc19e0043ee073492bb1a1da29a Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Sun, 23 Apr 2017 19:36:53 +0100 +Subject: [PATCH 152/171] BCM270X_DT: Add bme280 and bmp180 to i2c-sensor + overlay + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 11 +++++++++-- + arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 15 +++++++++++++++ + 2 files changed, 24 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 499cd1920fd373702cfbc9f6e0fcaebca8a47cfc..d32a31cbf4a4382ddfc1b38018ef3ff0ff445145 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -652,9 +652,16 @@ Name: i2c-sensor + Info: Adds support for a number of I2C barometric pressure and temperature + sensors on i2c_arm + Load: dtoverlay=i2c-sensor,= +-Params: bmp085 Select the Bosch sensortronic BMP085 ++Params: addr Set the address for the BME280 and BMP280 (0x76 ++ or 0x77 - default 0x76) + +- bmp280 Select the Bosch sensortronic BMP280 ++ bme280 Select the Bosch Sensortronic BME280 ++ ++ bmp085 Select the Bosch Sensortronic BMP085 ++ ++ bmp180 Select the Bosch Sensortronic BMP180 ++ ++ bmp280 Select the Bosch Sensortronic BMP280 + + lm75 Select the Maxim LM75 temperature sensor + +diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts +index 606b2d5012abf2e85712be631c42ea40a0b512c5..e23e34b32a0a8927c14203d7384e800878627347 100644 +--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts +@@ -12,6 +12,12 @@ + #size-cells = <0>; + status = "okay"; + ++ bme280: bme280@76 { ++ compatible = "bosch,bme280"; ++ reg = <0x76>; ++ status = "disable"; ++ }; ++ + bmp085: bmp085@77 { + compatible = "bosch,bmp085"; + reg = <0x77>; +@@ -19,6 +25,12 @@ + status = "disable"; + }; + ++ bmp180: bmp180@77 { ++ compatible = "bosch,bmp180"; ++ reg = <0x77>; ++ status = "disable"; ++ }; ++ + bmp280: bmp280@76 { + compatible = "bosch,bmp280"; + reg = <0x76>; +@@ -40,7 +52,10 @@ + }; + + __overrides__ { ++ addr = <&bme280>,"reg:0", <&bmp280>,"reg:0"; ++ bme280 = <&bme280>,"status"; + bmp085 = <&bmp085>,"status"; ++ bmp180 = <&bmp180>,"status"; + bmp280 = <&bmp280>,"status"; + lm75 = <&lm75>,"status"; + lm75addr = <&lm75>,"reg:0"; + +From 7db2a5fbc25090a46a453d71b820c15b9460c3bd Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Sun, 23 Apr 2017 19:38:06 +0100 +Subject: [PATCH 153/171] config: Add CONFIG_BMP280 (and CONFIG_BMP280_I2C) + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 822fa346cfdd35713e395433f1d6b9146af0dd4e..102a7113c9b2a2232b5cbf8358ff37929dac324a 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -1172,6 +1172,7 @@ CONFIG_MCP320X=m + CONFIG_MCP3422=m + CONFIG_DHT11=m + CONFIG_HTU21=m ++CONFIG_BMP280=m + CONFIG_PWM_BCM2835=m + CONFIG_PWM_PCA9685=m + CONFIG_RASPBERRYPI_FIRMWARE=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 7362d1a6e5759e45ebef3ba84a4454b86e69a901..fab31f0fed0ec068e5249f4cebc34e48cfd29759 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -1179,6 +1179,7 @@ CONFIG_MCP320X=m + CONFIG_MCP3422=m + CONFIG_DHT11=m + CONFIG_HTU21=m ++CONFIG_BMP280=m + CONFIG_PWM_BCM2835=m + CONFIG_PWM_PCA9685=m + CONFIG_RASPBERRYPI_FIRMWARE=y + +From 31a10e445e92a8a77277914d4b70083c8c837fa9 Mon Sep 17 00:00:00 2001 +From: Scott Ellis +Date: Tue, 25 Apr 2017 10:46:09 -0400 +Subject: [PATCH 154/171] config: Enable TI TMP102 temp sensor module + +Signed-off-by: Scott Ellis +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 102a7113c9b2a2232b5cbf8358ff37929dac324a..01a723db37ec09ec94256b1f35ff330ed0ee44f8 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -658,6 +658,7 @@ CONFIG_SENSORS_SHT21=m + CONFIG_SENSORS_SHTC1=m + CONFIG_SENSORS_ADS1015=m + CONFIG_SENSORS_INA2XX=m ++CONFIG_SENSORS_TMP102=m + CONFIG_THERMAL=y + CONFIG_BCM2835_THERMAL=y + CONFIG_WATCHDOG=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index fab31f0fed0ec068e5249f4cebc34e48cfd29759..91a5234a5884f24f1a656d297a3d906429477b5d 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -652,6 +652,7 @@ CONFIG_SENSORS_SHT21=m + CONFIG_SENSORS_SHTC1=m + CONFIG_SENSORS_ADS1015=m + CONFIG_SENSORS_INA2XX=m ++CONFIG_SENSORS_TMP102=m + CONFIG_THERMAL=y + CONFIG_BCM2835_THERMAL=y + CONFIG_WATCHDOG=y + +From 5b8fc8b27bfbdc5ae2ed6822cdd1d0c3ad131e8f Mon Sep 17 00:00:00 2001 +From: Scott Ellis +Date: Tue, 25 Apr 2017 13:05:42 -0400 +Subject: [PATCH 155/171] BCM270X_DT: Add tmp102 to i2c sensor overlay + +Signed-off-by: Scott Ellis +--- + arch/arm/boot/dts/overlays/README | 9 +++++++-- + arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 11 +++++++++-- + 2 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index d32a31cbf4a4382ddfc1b38018ef3ff0ff445145..4171208933e675a5a3a7e17f8b15447f30a11887 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -652,16 +652,18 @@ Name: i2c-sensor + Info: Adds support for a number of I2C barometric pressure and temperature + sensors on i2c_arm + Load: dtoverlay=i2c-sensor,= +-Params: addr Set the address for the BME280 and BMP280 (0x76 +- or 0x77 - default 0x76) ++Params: addr Set the address for the BME280, BMP280 or ++ TMP102 + + bme280 Select the Bosch Sensortronic BME280 ++ Valid addresses 0x76-0x77, default 0x76 + + bmp085 Select the Bosch Sensortronic BMP085 + + bmp180 Select the Bosch Sensortronic BMP180 + + bmp280 Select the Bosch Sensortronic BMP280 ++ Valid addresses 0x76-0x77, default 0x76 + + lm75 Select the Maxim LM75 temperature sensor + +@@ -671,6 +673,9 @@ Params: addr Set the address for the BME280 and BMP280 (0x76 + si7020 Select the Silicon Labs Si7013/20/21 humidity/ + temperature sensor + ++ tmp102 Select the Texas Instruments TMP102 temp sensor ++ Valid addresses 0x48-0x4b, default 0x48 ++ + + Name: i2c0-bcm2708 + Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations +diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts +index e23e34b32a0a8927c14203d7384e800878627347..e86a13f92c3f75c14fa4425cdfb081d6795ff76a 100644 +--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts +@@ -1,4 +1,4 @@ +-// Definitions for I2C based sensors using the Industrial IO interface. ++// Definitions for I2C based sensors using the Industrial IO or HWMON interface. + /dts-v1/; + /plugin/; + +@@ -48,11 +48,17 @@ + reg = <0x40>; + status = "disable"; + }; ++ ++ tmp102: tmp102@48 { ++ compatible = "ti,tmp102"; ++ reg = <0x48>; ++ status = "disable"; ++ }; + }; + }; + + __overrides__ { +- addr = <&bme280>,"reg:0", <&bmp280>,"reg:0"; ++ addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0"; + bme280 = <&bme280>,"status"; + bmp085 = <&bmp085>,"status"; + bmp180 = <&bmp180>,"status"; +@@ -60,5 +66,6 @@ + lm75 = <&lm75>,"status"; + lm75addr = <&lm75>,"reg:0"; + si7020 = <&si7020>,"status"; ++ tmp102 = <&tmp102>,"status"; + }; + }; + +From 827688ba97bf9886a4c182e3bacd948e2a297093 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 8 May 2017 16:43:40 +0100 +Subject: [PATCH 156/171] irq_bcm2836: Send event when onlining sleeping cores + +In order to reduce power consumption and bus traffic, it is sensible +for secondary cores to enter a low-power idle state when waiting to +be started. The wfe instruction causes a core to wait until an event +or interrupt arrives before continuing to the next instruction. +The sev instruction sends a wakeup event to the other cores, so call +it from bcm2836_smp_boot_secondary, the function that wakes up the +waiting cores during booting. + +It is harmless to use this patch without the corresponding change +adding wfe to the ARMv7/ARMv8-32 stubs, but if the stubs are updated +and this patch is not applied then the other cores will sleep forever. + +See: https://github.com/raspberrypi/linux/issues/1989 + +Signed-off-by: Phil Elwell +--- + drivers/irqchip/irq-bcm2836.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c +index 9a7ee04ee0d9b7aa734cf3159ed59c19a338de0d..014f13f89eb896f5cfc75ed9891787d0490baa4b 100644 +--- a/drivers/irqchip/irq-bcm2836.c ++++ b/drivers/irqchip/irq-bcm2836.c +@@ -248,6 +248,9 @@ static int __init bcm2836_smp_boot_secondary(unsigned int cpu, + writel(secondary_startup_phys, + intc.base + LOCAL_MAILBOX3_SET0 + 16 * cpu); + ++ dsb(sy); /* Ensure write has completed before waking the other CPUs */ ++ sev(); ++ + return 0; + } + + +From 48935b4579893dcec2188837d0e307713c4d5bdf Mon Sep 17 00:00:00 2001 +From: Ahmet Inan +Date: Mon, 15 May 2017 17:10:53 +0200 +Subject: [PATCH 157/171] overlays: Add Goodix overlay + +Add support for I2C connected Goodix gt9271 multiple touch controller using +GPIOs 4 and 17 (pins 7 and 11 on GPIO header) for interrupt and reset. + +Signed-off-by: Ahmet Inan +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 8 +++++ + arch/arm/boot/dts/overlays/goodix-overlay.dts | 46 +++++++++++++++++++++++++++ + 3 files changed, 55 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/goodix-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index e0ff5793f124fce73732e175bfca424f0a97b632..ddf431837b619f99beb8df45a2714c112e02273c 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -25,6 +25,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + enc28j60.dtbo \ + enc28j60-spi2.dtbo \ + fe-pi-audio.dtbo \ ++ goodix.dtbo \ + googlevoicehat-soundcard.dtbo \ + gpio-ir.dtbo \ + gpio-poweroff.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 4171208933e675a5a3a7e17f8b15447f30a11887..dc391ac88f738c9a711b01a87561c94733745457 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -459,6 +459,14 @@ Load: dtoverlay=fe-pi-audio + Params: + + ++Name: goodix ++Info: Enables I2C connected Goodix gt9271 multiple touch controller using ++ GPIOs 4 and 17 (pins 7 and 11 on GPIO header) for interrupt and reset. ++Load: dtoverlay=goodix,= ++Params: interrupt GPIO used for interrupt (default 4) ++ reset GPIO used for reset (default 17) ++ ++ + Name: googlevoicehat-soundcard + Info: Configures the Google voiceHAT soundcard + Load: dtoverlay=googlevoicehat-soundcard +diff --git a/arch/arm/boot/dts/overlays/goodix-overlay.dts b/arch/arm/boot/dts/overlays/goodix-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..084f74042ed6379ebd9281374d5391a7e23a431e +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/goodix-overlay.dts +@@ -0,0 +1,46 @@ ++// Device tree overlay for I2C connected Goodix gt9271 multiple touch controller ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&gpio>; ++ __overlay__ { ++ goodix_pins: goodix_pins { ++ brcm,pins = <4 17>; // interrupt and reset ++ brcm,function = <0 0>; // in ++ brcm,pull = <2 2>; // pull-up ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ gt9271: gt9271@14 { ++ compatible = "goodix,gt9271"; ++ reg = <0x14>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&goodix_pins>; ++ interrupt-parent = <&gpio>; ++ interrupts = <4 2>; // high-to-low edge triggered ++ irq-gpios = <&gpio 4 0>; // Pin7 on GPIO header ++ reset-gpios = <&gpio 17 0>; // Pin11 on GPIO header ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ interrupt = <&goodix_pins>,"brcm,pins:0", ++ <>9271>,"interrupts:0", ++ <>9271>,"irq-gpios:4"; ++ reset = <&goodix_pins>,"brcm,pins:4", ++ <>9271>,"reset-gpios:4"; ++ }; ++}; + +From ed834be03a7d7e947a7f527ce0b538dd7c8f1720 Mon Sep 17 00:00:00 2001 +From: chenzhiwo +Date: Wed, 17 May 2017 16:34:57 +0800 +Subject: [PATCH 158/171] Add device tree overlay for GPIO connected rotary + encoder. See Documentation/input/rotary-encoder.txt for more information. + +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 9 +++++ + .../boot/dts/overlays/rotary-encoder-overlay.dts | 43 ++++++++++++++++++++++ + 3 files changed, 53 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index ddf431837b619f99beb8df45a2714c112e02273c..6853e3575f001522a402e7eb31933d32fbac581d 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -76,6 +76,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + pwm-2chan.dtbo \ + qca7000.dtbo \ + raspidac3.dtbo \ ++ rotary-encoder.dtbo \ + rpi-backlight.dtbo \ + rpi-cirrus-wm5102.dtbo \ + rpi-dac.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index dc391ac88f738c9a711b01a87561c94733745457..f7e11387e535ce2dba8272798a023963315685b6 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1122,6 +1122,15 @@ Load: dtoverlay=raspidac3 + Params: + + ++Name: rotary-encoder ++Info: Overlay for GPIO connected rotary encoder. ++Load: dtoverlay=rotary-encoder,= ++Params: rotary0_pin_a GPIO connected to rotary encoder channel A ++ (default 4). ++ rotary0_pin_b GPIO connected to rotary encoder channel B ++ (default 17). ++ ++ + Name: rpi-backlight + Info: Raspberry Pi official display backlight driver + Load: dtoverlay=rpi-backlight +diff --git a/arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts b/arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..c0c6bccff60cc15d9a9bf59d2c7cba41eb9c1cdc +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/rotary-encoder-overlay.dts +@@ -0,0 +1,43 @@ ++// Device tree overlay for GPIO connected rotary encoder. ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&gpio>; ++ __overlay__ { ++ rotary0_pins: rotary0_pins { ++ brcm,pins = <4 17>; /* gpio 4 17 */ ++ brcm,function = <0 0>; /* input */ ++ brcm,pull = <2 2>; /* pull-up */ ++ }; ++ ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "/"; ++ __overlay__ { ++ rotary0: rotary@0 { ++ compatible = "rotary-encoder"; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rotary0_pins>; ++ gpios = <&gpio 4 0>, <&gpio 17 0>; ++ linux,axis = <0>; /* REL_X */ ++ rotary-encoder,encoding = "gray"; ++ rotary-encoder,relative-axis; ++ }; ++ }; ++ ++ }; ++ ++ __overrides__ { ++ rotary0_pin_a = <&rotary0>,"gpios:4", ++ <&rotary0_pins>,"brcm,pins:0"; ++ rotary0_pin_b = <&rotary0>,"gpios:16", ++ <&rotary0_pins>,"brcm,pins:4"; ++ }; ++}; + +From f5a5d7a65123ac8e4565b94e97e0bd7d88d2df88 Mon Sep 17 00:00:00 2001 +From: Anton Onishchenko +Date: Tue, 23 May 2017 18:55:46 +0300 +Subject: [PATCH 159/171] mpu6050 device tree overlay (#2031) + +Add overlay and config options for InvenSense MPU6050 6-axis motion +detector. +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 ++++++ + arch/arm/boot/dts/overlays/mpu6050-overlay.dts | 28 ++++++++++++++++++++++++++ + arch/arm/configs/bcm2709_defconfig | 3 +-- + arch/arm/configs/bcmrpi_defconfig | 3 +-- + 5 files changed, 37 insertions(+), 4 deletions(-) + create mode 100644 arch/arm/boot/dts/overlays/mpu6050-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 6853e3575f001522a402e7eb31933d32fbac581d..c95b37f0a4c72160421f44819c5f29246d3352f9 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -59,6 +59,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + midi-uart0.dtbo \ + midi-uart1.dtbo \ + mmc.dtbo \ ++ mpu6050.dtbo \ + mz61581.dtbo \ + pi3-act-led.dtbo \ + pi3-disable-bt.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index f7e11387e535ce2dba8272798a023963315685b6..d560490c2661c3396d37315bbb9b2d9e93b5ac15 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -898,6 +898,12 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework + requests 50MHz + + ++Name: mpu6050 ++Info: Overlay for i2c connected mpu6050 imu ++Load: dtoverlay=mpu6050,= ++Params: interrupt GPIO pin for interrupt (default 4) ++ ++ + Name: mz61581 + Info: MZ61581 display by Tontec + Load: dtoverlay=mz61581,= +diff --git a/arch/arm/boot/dts/overlays/mpu6050-overlay.dts b/arch/arm/boot/dts/overlays/mpu6050-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..06037969c3abba270b3cad45875342f3c730506e +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/mpu6050-overlay.dts +@@ -0,0 +1,28 @@ ++// Definitions for MPU6050 ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ clock-frequency = <400000>; ++ ++ mpu6050: mpu6050@68 { ++ compatible = "invensense,mpu6050"; ++ reg = <0x68>; ++ interrupt-parent = <&gpio>; ++ interrupts = <4 1>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ interrupt = <&mpu6050>,"interrupts:0"; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 01a723db37ec09ec94256b1f35ff330ed0ee44f8..d015a84fcc96e7d05736943eb590115f4078c1c2 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -1166,13 +1166,12 @@ CONFIG_RASPBERRYPI_POWER=y + CONFIG_EXTCON=m + CONFIG_EXTCON_ARIZONA=m + CONFIG_IIO=m +-CONFIG_IIO_BUFFER=y + CONFIG_IIO_BUFFER_CB=m +-CONFIG_IIO_KFIFO_BUF=m + CONFIG_MCP320X=m + CONFIG_MCP3422=m + CONFIG_DHT11=m + CONFIG_HTU21=m ++CONFIG_INV_MPU6050_I2C=m + CONFIG_BMP280=m + CONFIG_PWM_BCM2835=m + CONFIG_PWM_PCA9685=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 91a5234a5884f24f1a656d297a3d906429477b5d..2a28b012696a955f4d275a9e0a9fa3e155e4a3c6 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -1173,13 +1173,12 @@ CONFIG_RASPBERRYPI_POWER=y + CONFIG_EXTCON=m + CONFIG_EXTCON_ARIZONA=m + CONFIG_IIO=m +-CONFIG_IIO_BUFFER=y + CONFIG_IIO_BUFFER_CB=m +-CONFIG_IIO_KFIFO_BUF=m + CONFIG_MCP320X=m + CONFIG_MCP3422=m + CONFIG_DHT11=m + CONFIG_HTU21=m ++CONFIG_INV_MPU6050_I2C=m + CONFIG_BMP280=m + CONFIG_PWM_BCM2835=m + CONFIG_PWM_PCA9685=m + +From 98f4a21a4331ac0a1c04fd9a683826513a52362e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 31 May 2017 09:33:55 +0100 +Subject: [PATCH 160/171] config: Adding SENSOR_JC42 + +The jc42 module supports a number of I2C-based temperature +sensor modules. + +[ DM_RAID0 config lost because now selected by DM_RAID ] + +See: https://github.com/raspberrypi/linux/issues/2046 + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index d015a84fcc96e7d05736943eb590115f4078c1c2..3a41d3a47919046714fcd99db9aab51828ba005f 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -653,6 +653,7 @@ CONFIG_POWER_RESET=y + CONFIG_POWER_RESET_GPIO=y + CONFIG_BATTERY_DS2760=m + CONFIG_HWMON=m ++CONFIG_SENSORS_JC42=m + CONFIG_SENSORS_LM75=m + CONFIG_SENSORS_SHT21=m + CONFIG_SENSORS_SHTC1=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 2a28b012696a955f4d275a9e0a9fa3e155e4a3c6..706bd883dd345a8ad32d30386f7dcf1182fcfe85 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -647,6 +647,7 @@ CONFIG_POWER_RESET=y + CONFIG_POWER_RESET_GPIO=y + CONFIG_BATTERY_DS2760=m + CONFIG_HWMON=m ++CONFIG_SENSORS_JC42=m + CONFIG_SENSORS_LM75=m + CONFIG_SENSORS_SHT21=m + CONFIG_SENSORS_SHTC1=m + +From 4c3296dd854c2b02a042971e8fd4af8c2c57518f Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 31 May 2017 15:27:39 +0100 +Subject: [PATCH 161/171] BCM270X_DT: Improve i2c-sensor and i2c-rtc overlay + +Use the "__dormant__" feature to permit multiple instances of each +overlay, which is more useful now that changing the "reg" property +also changes the node address. Although the overlay grows slightly, +when applied only the requested node is included. + +Usage does not change, except that the "lm75addr" parameter of the +i2c-sensor overlay has been deprecated in favour of the generic +"addr" parameter. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 8 +- + arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 127 ++++++++++++++++++---- + arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 87 ++++++++++++--- + 3 files changed, 179 insertions(+), 43 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index d560490c2661c3396d37315bbb9b2d9e93b5ac15..ce8706a8aa88c36b0dee95c56ee58b4a524b8b43 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -660,8 +660,8 @@ Name: i2c-sensor + Info: Adds support for a number of I2C barometric pressure and temperature + sensors on i2c_arm + Load: dtoverlay=i2c-sensor,= +-Params: addr Set the address for the BME280, BMP280 or +- TMP102 ++Params: addr Set the address for the BME280, BMP280, TMP102 ++ or LM75 + + bme280 Select the Bosch Sensortronic BME280 + Valid addresses 0x76-0x77, default 0x76 +@@ -674,9 +674,9 @@ Params: addr Set the address for the BME280, BMP280 or + Valid addresses 0x76-0x77, default 0x76 + + lm75 Select the Maxim LM75 temperature sensor ++ Valid addresses 0x48-0x4f, default 0x4f + +- lm75addr Choose the address for the LM75 (0x48-0x4f - +- default 0x4f) ++ lm75addr Deprecated - use addr parameter instead + + si7020 Select the Silicon Labs Si7013/20/21 humidity/ + temperature sensor +diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +index 1efcf0b712c9c5c19210545002ac1f0931db58f5..6140f172a86b8731782f938f76cb5dac9f28b662 100644 +--- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts +@@ -7,7 +7,7 @@ + + fragment@0 { + target = <&i2c_arm>; +- __overlay__ { ++ __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; +@@ -17,61 +17,142 @@ + reg = <0x69>; + abracon,tc-diode = "standard"; + abracon,tc-resistor = <0>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + ds1307: ds1307@68 { + compatible = "maxim,ds1307"; + reg = <0x68>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + ds1339: ds1339@68 { + compatible = "dallas,ds1339"; + trickle-resistor-ohms = <0>; + reg = <0x68>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ ds3231: ds3231@68 { ++ compatible = "maxim,ds3231"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + mcp7940x: mcp7940x@6f { + compatible = "microchip,mcp7940x"; + reg = <0x6f>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@5 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + mcp7941x: mcp7941x@6f { + compatible = "microchip,mcp7941x"; + reg = <0x6f>; +- status = "disable"; +- }; +- ds3231: ds3231@68 { +- compatible = "maxim,ds3231"; +- reg = <0x68>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@6 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + pcf2127: pcf2127@51 { + compatible = "nxp,pcf2127"; + reg = <0x51>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@7 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + pcf8523: pcf8523@68 { + compatible = "nxp,pcf8523"; + reg = <0x68>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@8 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + pcf8563: pcf8563@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; +- status = "disable"; ++ status = "okay"; + }; + }; + }; ++ + __overrides__ { +- abx80x = <&abx80x>,"status"; +- ds1307 = <&ds1307>,"status"; +- ds1339 = <&ds1339>,"status"; +- ds3231 = <&ds3231>,"status"; +- mcp7940x = <&mcp7940x>,"status"; +- mcp7941x = <&mcp7941x>,"status"; +- pcf2127 = <&pcf2127>,"status"; +- pcf8523 = <&pcf8523>,"status"; +- pcf8563 = <&pcf8563>,"status"; ++ abx80x = <0>,"+0"; ++ ds1307 = <0>,"+1"; ++ ds1339 = <0>,"+2"; ++ ds3231 = <0>,"+3"; ++ mcp7940x = <0>,"+4"; ++ mcp7941x = <0>,"+5"; ++ pcf2127 = <0>,"+6"; ++ pcf8523 = <0>,"+7"; ++ pcf8563 = <0>,"+8"; + trickle-diode-type = <&abx80x>,"abracon,tc-diode"; + trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0", + <&abx80x>,"abracon,tc-resistor"; +diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts +index e86a13f92c3f75c14fa4425cdfb081d6795ff76a..d2f0008addfadac8f6ed774a6e4f3f97871c0d61 100644 +--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts +@@ -7,7 +7,7 @@ + + fragment@0 { + target = <&i2c_arm>; +- __overlay__ { ++ __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; +@@ -15,57 +15,112 @@ + bme280: bme280@76 { + compatible = "bosch,bme280"; + reg = <0x76>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; + + bmp085: bmp085@77 { + compatible = "bosch,bmp085"; + reg = <0x77>; + default-oversampling = <3>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; + + bmp180: bmp180@77 { + compatible = "bosch,bmp180"; + reg = <0x77>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; + + bmp280: bmp280@76 { + compatible = "bosch,bmp280"; + reg = <0x76>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; + + lm75: lm75@4f { + compatible = "lm75"; + reg = <0x4f>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@5 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; + + si7020: si7020@40 { + compatible = "si7020"; + reg = <0x40>; +- status = "disable"; ++ status = "okay"; + }; ++ }; ++ }; ++ ++ fragment@6 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; + + tmp102: tmp102@48 { + compatible = "ti,tmp102"; + reg = <0x48>; +- status = "disable"; ++ status = "okay"; + }; + }; + }; + + __overrides__ { +- addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0"; +- bme280 = <&bme280>,"status"; +- bmp085 = <&bmp085>,"status"; +- bmp180 = <&bmp180>,"status"; +- bmp280 = <&bmp280>,"status"; +- lm75 = <&lm75>,"status"; ++ addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0", ++ <&lm75>,"reg:0"; ++ bme280 = <0>,"+0"; ++ bmp085 = <0>,"+1"; ++ bmp180 = <0>,"+2"; ++ bmp280 = <0>,"+3"; ++ lm75 = <0>,"+4"; + lm75addr = <&lm75>,"reg:0"; +- si7020 = <&si7020>,"status"; +- tmp102 = <&tmp102>,"status"; ++ si7020 = <0>,"+5"; ++ tmp102 = <0>,"+6"; + }; + }; + +From c8497d329f53d5a3036758094bcd717d46163507 Mon Sep 17 00:00:00 2001 +From: Stefan Tatschner +Date: Mon, 29 May 2017 21:46:16 +0200 +Subject: [PATCH 162/171] Add device tree config for htu21 + +See: https://github.com/raspberrypi/linux/pull/2041 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/README | 2 ++ + arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 26 ++++++++++++++++++----- + 2 files changed, 23 insertions(+), 5 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index ce8706a8aa88c36b0dee95c56ee58b4a524b8b43..bce02c82f3438995e5a74080876391f758bfe27b 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -673,6 +673,8 @@ Params: addr Set the address for the BME280, BMP280, TMP102 + bmp280 Select the Bosch Sensortronic BMP280 + Valid addresses 0x76-0x77, default 0x76 + ++ htu21 Select the HTU21 temperature and humidity sensor ++ + lm75 Select the Maxim LM75 temperature sensor + Valid addresses 0x48-0x4f, default 0x4f + +diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts +index d2f0008addfadac8f6ed774a6e4f3f97871c0d61..17c27e3b666a7a83619471b50c63bb93836653c5 100644 +--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts ++++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts +@@ -73,6 +73,21 @@ + #size-cells = <0>; + status = "okay"; + ++ htu21: htu21@40 { ++ compatible = "htu21"; ++ reg = <0x40>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@5 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ + lm75: lm75@4f { + compatible = "lm75"; + reg = <0x4f>; +@@ -81,7 +96,7 @@ + }; + }; + +- fragment@5 { ++ fragment@6 { + target = <&i2c_arm>; + __dormant__ { + #address-cells = <1>; +@@ -96,7 +111,7 @@ + }; + }; + +- fragment@6 { ++ fragment@7 { + target = <&i2c_arm>; + __dormant__ { + #address-cells = <1>; +@@ -118,9 +133,10 @@ + bmp085 = <0>,"+1"; + bmp180 = <0>,"+2"; + bmp280 = <0>,"+3"; +- lm75 = <0>,"+4"; ++ htu21 = <0>,"+4"; ++ lm75 = <0>,"+5"; + lm75addr = <&lm75>,"reg:0"; +- si7020 = <0>,"+5"; +- tmp102 = <0>,"+6"; ++ si7020 = <0>,"+6"; ++ tmp102 = <0>,"+7"; + }; + }; + +From 0068e5663fe3de47a8624ff0712fce7a07d3083d Mon Sep 17 00:00:00 2001 +From: sandeepal +Date: Fri, 2 Jun 2017 18:59:46 +0530 +Subject: [PATCH 163/171] Allo Digione Driver (#2048) + +Driver for the Allo Digione soundcard +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 + + .../arm/boot/dts/overlays/allo-digione-overlay.dts | 44 ++++ + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + sound/soc/bcm/Kconfig | 7 + + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/allo-digione.c | 268 +++++++++++++++++++++ + 8 files changed, 330 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/allo-digione-overlay.dts + create mode 100644 sound/soc/bcm/allo-digione.c + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index c95b37f0a4c72160421f44819c5f29246d3352f9..eca81982c0f19988abd05165fc62a80d26f539cb 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -8,6 +8,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + ads7846.dtbo \ + akkordion-iqdacplus.dtbo \ + allo-boss-dac-pcm512x-audio.dtbo \ ++ allo-digione.dtbo \ + allo-piano-dac-pcm512x-audio.dtbo \ + allo-piano-dac-plus-pcm512x-audio.dtbo \ + at86rf233.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index bce02c82f3438995e5a74080876391f758bfe27b..19df6883be4277240283d5f63f27e34a22a2eec5 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -287,6 +287,12 @@ Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec + slave" + + ++Name: allo-digione ++Info: Configures the Allo Digione audio card ++Load: dtoverlay=allo-digione ++Params: ++ ++ + Name: allo-piano-dac-pcm512x-audio + Info: Configures the Allo Piano DAC (2.0/2.1) audio cards. + (NB. This initial support is for 2.0 channel audio ONLY! ie. stereo. +diff --git a/arch/arm/boot/dts/overlays/allo-digione-overlay.dts b/arch/arm/boot/dts/overlays/allo-digione-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..101277a11a24e9b3eb441c44c3f19c61836fe77c +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/allo-digione-overlay.dts +@@ -0,0 +1,44 @@ ++// Definitions for Allo DigiOne ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2s>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8804@3b { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8804"; ++ reg = <0x3b>; ++ PVDD-supply = <&vdd_3v3_reg>; ++ DVDD-supply = <&vdd_3v3_reg>; ++ status = "okay"; ++ wlf,reset-gpio = <&gpio 17 0>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "allo,allo-digione"; ++ i2s-controller = <&i2s>; ++ status = "okay"; ++ clock44-gpio = <&gpio 5 0>; ++ clock48-gpio = <&gpio 6 0>; ++ }; ++ }; ++}; +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 3a41d3a47919046714fcd99db9aab51828ba005f..bd26ebc59b14b8f4fe8b89992e507ee35ed75047 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -894,6 +894,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m + CONFIG_SND_PISOUND=m + CONFIG_SND_SOC_ADAU1701=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 706bd883dd345a8ad32d30386f7dcf1182fcfe85..cead8c64336bb4ce9656bb20384069917695852d 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -888,6 +888,7 @@ CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m + CONFIG_SND_PISOUND=m + CONFIG_SND_SOC_ADAU1701=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 355bdeb25f81d15593f78df0e87a48404908ca4b..381d32bb9deb3cf2c531e2a4563418cd6eb9d505 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -176,6 +176,13 @@ config SND_BCM2708_SOC_ALLO_BOSS_DAC + help + Say Y or M if you want to add support for Allo Boss DAC. + ++config SND_BCM2708_SOC_ALLO_DIGIONE ++ tristate "Support for Allo DigiOne" ++ depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S ++ select SND_SOC_PCM512x_I2C ++ help ++ Say Y or M if you want to add support for Allo DigiOne. ++ + config SND_BCM2708_SOC_FE_PI_AUDIO + tristate "Support for Fe-Pi-Audio" + depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 72e1620fa4038035804cf3b2a09c6b12e7ae0fe1..53ea8229d7ac2065176983385dd7ba85ee3915ea 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -34,6 +34,7 @@ snd-soc-dionaudio-loco-v2-objs := dionaudio_loco-v2.o + snd-soc-allo-boss-dac-objs := allo-boss-dac.o + snd-soc-allo-piano-dac-objs := allo-piano-dac.o + snd-soc-allo-piano-dac-plus-objs := allo-piano-dac-plus.o ++snd-soc-allo-digione-objs := allo-digione.o + snd-soc-pisound-objs := pisound.o + snd-soc-fe-pi-audio-objs := fe-pi-audio.o + +@@ -60,5 +61,6 @@ obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2) += snd-soc-dionaudio-loco-v2.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC) += snd-soc-allo-boss-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC) += snd-soc-allo-piano-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS) += snd-soc-allo-piano-dac-plus.o ++obj-$(CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE) += snd-soc-allo-digione.o + obj-$(CONFIG_SND_PISOUND) += snd-soc-pisound.o + obj-$(CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO) += snd-soc-fe-pi-audio.o +diff --git a/sound/soc/bcm/allo-digione.c b/sound/soc/bcm/allo-digione.c +new file mode 100644 +index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a4505ebad +--- /dev/null ++++ b/sound/soc/bcm/allo-digione.c +@@ -0,0 +1,268 @@ ++/* ++ * ASoC Driver for Allo DigiOne ++ * ++ * Author: Baswaraj ++ * Copyright 2017 ++ * based on code by Daniel Matuschek ++ * based on code by Florian Meier ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/wm8804.h" ++ ++static short int auto_shutdown_output = 0; ++module_param(auto_shutdown_output, short, ++ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); ++MODULE_PARM_DESC(auto_shutdown_output, "Shutdown SP/DIF output if playback is stopped"); ++ ++#define CLK_44EN_RATE 22579200UL ++#define CLK_48EN_RATE 24576000UL ++ ++static struct gpio_desc *snd_allo_clk44gpio; ++static struct gpio_desc *snd_allo_clk48gpio; ++ ++static int samplerate = 44100; ++ ++static uint32_t snd_allo_digione_enable_clock(int sample_rate) ++{ ++ switch (sample_rate) { ++ case 11025: ++ case 22050: ++ case 44100: ++ case 88200: ++ case 176400: ++ gpiod_set_value_cansleep(snd_allo_clk44gpio, 1); ++ gpiod_set_value_cansleep(snd_allo_clk48gpio, 0); ++ return CLK_44EN_RATE; ++ default: ++ gpiod_set_value_cansleep(snd_allo_clk48gpio, 1); ++ gpiod_set_value_cansleep(snd_allo_clk44gpio, 0); ++ return CLK_48EN_RATE; ++ } ++} ++ ++ ++static int snd_allo_digione_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_codec *codec = rtd->codec; ++ ++ /* enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ return 0; ++} ++ ++static int snd_allo_digione_startup(struct snd_pcm_substream *substream) ++{ ++ /* turn on digital output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00); ++ return 0; ++} ++ ++static void snd_allo_digione_shutdown(struct snd_pcm_substream *substream) ++{ ++ /* turn off output */ ++ if (auto_shutdown_output) { ++ /* turn off output */ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_codec *codec = rtd->codec; ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c); ++ } ++} ++ ++static int snd_allo_digione_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ ++ int sysclk = 27000000; /* This is fixed on this board */ ++ ++ long mclk_freq = 0; ++ int mclk_div = 1; ++ int sampling_freq = 1; ++ ++ int ret; ++ ++ samplerate = params_rate(params); ++ ++ if (samplerate <= 96000) { ++ mclk_freq = samplerate * 256; ++ mclk_div = WM8804_MCLKDIV_256FS; ++ } else { ++ mclk_freq = samplerate * 128; ++ mclk_div = WM8804_MCLKDIV_128FS; ++ } ++ ++ sysclk = snd_allo_digione_enable_clock(samplerate); ++ ++ switch (samplerate) { ++ case 32000: ++ sampling_freq=0x03; ++ break; ++ case 44100: ++ sampling_freq=0x00; ++ break; ++ case 48000: ++ sampling_freq=0x02; ++ break; ++ case 88200: ++ sampling_freq=0x08; ++ break; ++ case 96000: ++ sampling_freq=0x0a; ++ break; ++ case 176400: ++ sampling_freq=0x0c; ++ break; ++ case 192000: ++ sampling_freq=0x0e; ++ break; ++ default: ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n", ++ samplerate); ++ } ++ ++ snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); ++ snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, ++ sysclk, SND_SOC_CLOCK_OUT); ++ ++ if (ret < 0) { ++ dev_err(codec->dev, ++ "Failed to set WM8804 SYSCLK: %d\n", ret); ++ return ret; ++ } ++ ++ /* Enable TX output */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0); ++ ++ /* Power on */ ++ snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0); ++ ++ /* set sampling frequency status bits */ ++ snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq); ++ ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, 64); ++} ++ ++/* machine stream operations */ ++static struct snd_soc_ops snd_allo_digione_ops = { ++ .hw_params = snd_allo_digione_hw_params, ++ .startup = snd_allo_digione_startup, ++ .shutdown = snd_allo_digione_shutdown, ++}; ++ ++static struct snd_soc_dai_link snd_allo_digione_dai[] = { ++{ ++ .name = "Allo DigiOne", ++ .stream_name = "Allo DigiOne HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "wm8804-spdif", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "wm8804.1-003b", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | ++ SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBM_CFM, ++ .ops = &snd_allo_digione_ops, ++ .init = snd_allo_digione_init, ++}, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card snd_allo_digione = { ++ .name = "snd_allo_digione", ++ .driver_name = "AlloDigiOne", ++ .owner = THIS_MODULE, ++ .dai_link = snd_allo_digione_dai, ++ .num_links = ARRAY_SIZE(snd_allo_digione_dai), ++}; ++ ++static int snd_allo_digione_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_allo_digione.dev = &pdev->dev; ++ ++ if (pdev->dev.of_node) { ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_allo_digione_dai[0]; ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); ++ ++ if (i2s_node) { ++ dai->cpu_dai_name = NULL; ++ dai->cpu_of_node = i2s_node; ++ dai->platform_name = NULL; ++ dai->platform_of_node = i2s_node; ++ } ++ ++ snd_allo_clk44gpio = ++ devm_gpiod_get(&pdev->dev, "clock44", GPIOD_OUT_LOW); ++ if (IS_ERR(snd_allo_clk44gpio)) ++ dev_err(&pdev->dev, "devm_gpiod_get() failed\n"); ++ ++ snd_allo_clk48gpio = ++ devm_gpiod_get(&pdev->dev, "clock48", GPIOD_OUT_LOW); ++ if (IS_ERR(snd_allo_clk48gpio)) ++ dev_err(&pdev->dev, "devm_gpiod_get() failed\n"); ++ } ++ ++ ret = snd_soc_register_card(&snd_allo_digione); ++ if (ret && ret != -EPROBE_DEFER) ++ dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ++ ret); ++ ++ return ret; ++} ++ ++static int snd_allo_digione_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_allo_digione); ++} ++ ++static const struct of_device_id snd_allo_digione_of_match[] = { ++ { .compatible = "allo,allo-digione", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, snd_allo_digione_of_match); ++ ++static struct platform_driver snd_allo_digione_driver = { ++ .driver = { ++ .name = "snd-allo-digione", ++ .owner = THIS_MODULE, ++ .of_match_table = snd_allo_digione_of_match, ++ }, ++ .probe = snd_allo_digione_probe, ++ .remove = snd_allo_digione_remove, ++}; ++ ++module_platform_driver(snd_allo_digione_driver); ++ ++MODULE_AUTHOR("Baswaraj "); ++MODULE_DESCRIPTION("ASoC Driver for Allo DigiOne"); ++MODULE_LICENSE("GPL v2"); + +From cb6ba152a1c6fb236959f373964ad177247e9042 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Mon, 5 Jun 2017 16:40:38 +0100 +Subject: [PATCH 164/171] dma-bcm2708: Fix module compilation of + CONFIG_DMA_BCM2708 + +bcm2708-dmaengine.c defines functions like bcm_dma_start which are +defined as well in dma-bcm2708.h as inline versions when +CONFIG_DMA_BCM2708 is not defined. This works fine when +CONFIG_DMA_BCM2708 is built in, but when it is selected as module build +fails with redefinition errors because in the build system when +CONFIG_DMA_BCM2708 is selected as module, the macro becomes +CONFIG_DMA_BCM2708_MODULE. + +This patch makes the header use CONFIG_DMA_BCM2708_MODULE too when +available. + +Fixes https://github.com/raspberrypi/linux/issues/2056 + +Signed-off-by: Andrei Gherzan +--- + include/linux/platform_data/dma-bcm2708.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/linux/platform_data/dma-bcm2708.h b/include/linux/platform_data/dma-bcm2708.h +index c5bfff2765be4606077e6c8af73040ec13ee8974..6ca874d332a8bc666b1c9576ac51f479b98de14d 100644 +--- a/include/linux/platform_data/dma-bcm2708.h ++++ b/include/linux/platform_data/dma-bcm2708.h +@@ -75,7 +75,7 @@ struct bcm2708_dma_cb { + struct scatterlist; + struct platform_device; + +-#ifdef CONFIG_DMA_BCM2708 ++#if defined(CONFIG_DMA_BCM2708) || defined(CONFIG_DMA_BCM2708_MODULE) + + int bcm_sg_suitable_for_dma(struct scatterlist *sg_ptr, int sg_len); + void bcm_dma_start(void __iomem *dma_chan_base, dma_addr_t control_block); +@@ -138,6 +138,6 @@ static inline int bcm_dmaman_remove(struct platform_device *pdev) + return 0; + } + +-#endif /* CONFIG_DMA_BCM2708 */ ++#endif /* CONFIG_DMA_BCM2708 || CONFIG_DMA_BCM2708_MODULE */ + + #endif /* _PLAT_BCM2708_DMA_H */ + +From 2372c8ee0241c4230e5cdf0e736c27ef34a8cb9f Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 20 Jun 2017 17:51:47 +0100 +Subject: [PATCH 165/171] bcm2835-cpufreq: Change licence to GPLv2 + +Signed-off-by: Eben Upton +Signed-off-by: Dom Cobley +--- + drivers/cpufreq/bcm2835-cpufreq.c | 36 ++++++++++++++---------------------- + 1 file changed, 14 insertions(+), 22 deletions(-) + +diff --git a/drivers/cpufreq/bcm2835-cpufreq.c b/drivers/cpufreq/bcm2835-cpufreq.c +index 414fbdc10dfbfc6e4bb47870a7af3fd5780f9c9a..99345969b0e4d651fd9033d67de2febb13fc0892 100644 +--- a/drivers/cpufreq/bcm2835-cpufreq.c ++++ b/drivers/cpufreq/bcm2835-cpufreq.c +@@ -1,25 +1,17 @@ +-/***************************************************************************** +-* Copyright 2011 Broadcom Corporation. All rights reserved. +-* +-* Unless you and Broadcom execute a separate written software license +-* agreement governing use of this software, this software is licensed to you +-* under the terms of the GNU General Public License version 2, available at +-* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). +-* +-* Notwithstanding the above, under no circumstances may you combine this +-* software in any way with any other Broadcom software provided under a +-* license other than the GPL, without Broadcom's express prior written +-* consent. +-*****************************************************************************/ +- +-/***************************************************************************** +-* FILENAME: bcm2835-cpufreq.h +-* DESCRIPTION: This driver dynamically manages the CPU Frequency of the ARM +-* processor. Messages are sent to Videocore either setting or requesting the +-* frequency of the ARM in order to match an appropiate frequency to the current +-* usage of the processor. The policy which selects the frequency to use is +-* defined in the kernel .config file, but can be changed during runtime. +-*****************************************************************************/ ++/* ++ * Copyright 2011 Broadcom Corporation. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; version 2 ++ * of the License. ++ * ++ * This driver dynamically manages the CPU Frequency of the ARM ++ * processor. Messages are sent to Videocore either setting or requesting the ++ * frequency of the ARM in order to match an appropiate frequency to the current ++ * usage of the processor. The policy which selects the frequency to use is ++ * defined in the kernel .config file, but can be changed during runtime. ++ */ + + /* ---------- INCLUDES ---------- */ + #include + +From a92dc03b6bb05c1f5fafef61ede5a845ac1a361c Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 21 Jun 2017 09:03:51 -0700 +Subject: [PATCH 166/171] bcm2708: Drop CMA alignment from FKMS mode as well. + +I dropped it from KMS mode in d88274d88ed81de1ade8e18e4c0ed91792ec82ea +and should have done both of them at that time. + +Signed-off-by: Eric Anholt +--- + arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts b/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts +index 95a595a35cb4fbb707bf4b18161f6a46860aa4ae..36fbf6c8c2e612a6dc5aa02d77cc8173098c16ca 100644 +--- a/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-fkms-v3d-overlay.dts +@@ -11,35 +11,35 @@ + fragment@0 { + target-path = "/chosen"; + __overlay__ { +- bootargs = "cma=256M@256M"; ++ bootargs = "cma=256M"; + }; + }; + + fragment@1 { + target-path = "/chosen"; + __dormant__ { +- bootargs = "cma=192M@256M"; ++ bootargs = "cma=192M"; + }; + }; + + fragment@2 { + target-path = "/chosen"; + __dormant__ { +- bootargs = "cma=128M@128M"; ++ bootargs = "cma=128M"; + }; + }; + + fragment@3 { + target-path = "/chosen"; + __dormant__ { +- bootargs = "cma=96M@128M"; ++ bootargs = "cma=96M"; + }; + }; + + fragment@4 { + target-path = "/chosen"; + __dormant__ { +- bootargs = "cma=64M@64M"; ++ bootargs = "cma=64M"; + }; + }; + + +From ceb04cf72b1a78a7e66c4d4ab33c7d6658e7ffca Mon Sep 17 00:00:00 2001 +From: Steve Conner +Date: Thu, 29 Jun 2017 15:56:19 +0100 +Subject: [PATCH 167/171] New i2c-rtc-gpio device overlay (#2092) + +Created new i2c-rtc-gpio device overlay by combining i2c-rtc and i2c-gpio. Tested with PCF2127 on CM3. +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 41 +++++ + .../arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts | 183 +++++++++++++++++++++ + 3 files changed, 225 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index eca81982c0f19988abd05165fc62a80d26f539cb..8a3131f5a4bc90d4a597b416416953e8e49d41ec 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -42,6 +42,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + i2c-mux.dtbo \ + i2c-pwm-pca9685a.dtbo \ + i2c-rtc.dtbo \ ++ i2c-rtc-gpio.dtbo \ + i2c-sensor.dtbo \ + i2c0-bcm2708.dtbo \ + i2c1-bcm2708.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index 19df6883be4277240283d5f63f27e34a22a2eec5..a69e3a0d8dce1633598dd3cd8e00cad9509eee03 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -662,6 +662,47 @@ Params: abx80x Select one of the ABx80x family: + source + + ++Name: i2c-rtc-gpio ++Info: Adds support for a number of I2C Real Time Clock devices ++ using the software i2c controller ++Load: dtoverlay=i2c-rtc-gpio,= ++Params: abx80x Select one of the ABx80x family: ++ AB0801, AB0803, AB0804, AB0805, ++ AB1801, AB1803, AB1804, AB1805 ++ ++ ds1307 Select the DS1307 device ++ ++ ds1339 Select the DS1339 device ++ ++ ds3231 Select the DS3231 device ++ ++ mcp7940x Select the MCP7940x device ++ ++ mcp7941x Select the MCP7941x device ++ ++ pcf2127 Select the PCF2127 device ++ ++ pcf8523 Select the PCF8523 device ++ ++ pcf8563 Select the PCF8563 device ++ ++ trickle-diode-type Diode type for trickle charge - "standard" or ++ "schottky" (ABx80x only) ++ ++ trickle-resistor-ohms Resistor value for trickle charge (DS1339, ++ ABx80x) ++ ++ wakeup-source Specify that the RTC can be used as a wakeup ++ source ++ ++ i2c_gpio_sda GPIO used for I2C data (default "23") ++ ++ i2c_gpio_scl GPIO used for I2C clock (default "24") ++ ++ i2c_gpio_delay_us Clock delay in microseconds ++ (default "2" = ~100kHz) ++ ++ + Name: i2c-sensor + Info: Adds support for a number of I2C barometric pressure and temperature + sensors on i2c_arm +diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..8415e6081428fba9a47682964174fc023cfd2b0c +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts +@@ -0,0 +1,183 @@ ++// Definitions for several I2C based Real Time Clocks ++// Available through i2c-gpio ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target-path = "/"; ++ __overlay__ { ++ i2c_gpio: i2c-gpio-rtc@0 { ++ compatible = "i2c-gpio"; ++ gpios = <&gpio 23 0 /* sda */ ++ &gpio 24 0 /* scl */ ++ >; ++ i2c-gpio,delay-us = <2>; /* ~100 kHz */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ abx80x: abx80x@69 { ++ compatible = "abracon,abx80x"; ++ reg = <0x69>; ++ abracon,tc-diode = "standard"; ++ abracon,tc-resistor = <0>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ ds1307: ds1307@68 { ++ compatible = "maxim,ds1307"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ ds1339: ds1339@68 { ++ compatible = "dallas,ds1339"; ++ trickle-resistor-ohms = <0>; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ ds3231: ds3231@68 { ++ compatible = "maxim,ds3231"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@5 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ mcp7940x: mcp7940x@6f { ++ compatible = "microchip,mcp7940x"; ++ reg = <0x6f>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@6 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ mcp7941x: mcp7941x@6f { ++ compatible = "microchip,mcp7941x"; ++ reg = <0x6f>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@7 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcf2127: pcf2127@51 { ++ compatible = "nxp,pcf2127"; ++ reg = <0x51>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@8 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcf8523: pcf8523@68 { ++ compatible = "nxp,pcf8523"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@9 { ++ target = <&i2c_gpio>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcf8563: pcf8563@51 { ++ compatible = "nxp,pcf8563"; ++ reg = <0x51>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ abx80x = <0>,"+1"; ++ ds1307 = <0>,"+2"; ++ ds1339 = <0>,"+3"; ++ ds3231 = <0>,"+4"; ++ mcp7940x = <0>,"+5"; ++ mcp7941x = <0>,"+6"; ++ pcf2127 = <0>,"+7"; ++ pcf8523 = <0>,"+8"; ++ pcf8563 = <0>,"+9"; ++ trickle-diode-type = <&abx80x>,"abracon,tc-diode"; ++ trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0", ++ <&abx80x>,"abracon,tc-resistor"; ++ wakeup-source = <&ds1339>,"wakeup-source?", ++ <&ds3231>,"wakeup-source?", ++ <&mcp7940x>,"wakeup-source?", ++ <&mcp7941x>,"wakeup-source?"; ++ i2c_gpio_sda = <&i2c_gpio>,"gpios:4"; ++ i2c_gpio_scl = <&i2c_gpio>,"gpios:16"; ++ i2c_gpio_delay_us = <&i2c_gpio>,"i2c-gpio,delay-us:0"; ++ }; ++}; + +From 700d2207f6574dcde5ead4b83403ad85cd086f25 Mon Sep 17 00:00:00 2001 +From: Allo +Date: Mon, 3 Jul 2017 15:45:20 +0530 +Subject: [PATCH 168/171] PianoPlus: Dual Mono & Dual Stereo features added + (#2069) + +--- + sound/soc/bcm/allo-piano-dac-plus.c | 160 +++++++++++++++++++++++++++++++----- + 1 file changed, 141 insertions(+), 19 deletions(-) + +diff --git a/sound/soc/bcm/allo-piano-dac-plus.c b/sound/soc/bcm/allo-piano-dac-plus.c +index 56e43f98846b41e487b3089813f7edc3c08517eb..d4e99e3c6a383d92fb0cf9e8c1cd1e7657358d49 100644 +--- a/sound/soc/bcm/allo-piano-dac-plus.c ++++ b/sound/soc/bcm/allo-piano-dac-plus.c +@@ -36,6 +36,7 @@ struct dsp_code { + + struct glb_pool { + struct mutex lock; ++ unsigned int dual_mode; + unsigned int set_lowpass; + unsigned int set_mode; + unsigned int set_rate; +@@ -47,8 +48,8 @@ bool glb_mclk; + + static struct gpio_desc *mute_gpio[2]; + +- + static const char * const allo_piano_mode_texts[] = { ++ "None", + "2.0", + "2.1", + "2.2", +@@ -57,6 +58,15 @@ static const char * const allo_piano_mode_texts[] = { + static const SOC_ENUM_SINGLE_DECL(allo_piano_mode_enum, + 0, 0, allo_piano_mode_texts); + ++static const char * const allo_piano_dual_mode_texts[] = { ++ "None", ++ "Dual-Mono", ++ "Dual-Stereo", ++}; ++ ++static const SOC_ENUM_SINGLE_DECL(allo_piano_dual_mode_enum, ++ 0, 0, allo_piano_dual_mode_texts); ++ + static const char * const allo_piano_dsp_low_pass_texts[] = { + "60", + "70", +@@ -82,10 +92,10 @@ static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, + unsigned int mode, unsigned int rate, unsigned int lowpass) + { + const struct firmware *fw; +- char firmware_name[60]; +- int ret = 0, dac = 0; + struct snd_soc_card *card = rtd->card; + struct glb_pool *glb_ptr = card->drvdata; ++ char firmware_name[60]; ++ int ret = 0, dac = 0; + + if (rate <= 46000) + rate = 44100; +@@ -100,26 +110,35 @@ static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, + else + rate = 192000; + +- if ((lowpass > 14) || (lowpass < 0)) +- lowpass = 3; +- if ((mode > 2) || (mode < 0)) +- mode = 0; ++ if (lowpass > 14) ++ glb_ptr->set_lowpass = lowpass = 3; ++ ++ if (mode > 3) ++ glb_ptr->set_mode = mode = 0; ++ ++ if (mode > 0) ++ glb_ptr->dual_mode = 0; + + /* same configuration loaded */ + if ((rate == glb_ptr->set_rate) && (lowpass == glb_ptr->set_lowpass) + && (mode == glb_ptr->set_mode)) + return 0; + +- if (mode == 0) { /* 2.0 */ +- snd_soc_write(rtd->codec_dais[1]->codec, +- PCM512x_MUTE, 0x11); ++ switch (mode) { ++ case 0: /* None */ ++ return 1; ++ ++ case 1: /* 2.0 */ ++ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); ++ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x11); + glb_ptr->set_rate = rate; + glb_ptr->set_mode = mode; + glb_ptr->set_lowpass = lowpass; + return 1; +- } else { +- snd_soc_write(rtd->codec_dais[1]->codec, +- PCM512x_MUTE, 0x00); ++ ++ default: ++ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); ++ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x00); + } + + for (dac = 0; dac < rtd->num_codecs; dac++) { +@@ -128,13 +147,13 @@ static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, + int i = 1; + + if (dac == 0) { /* high */ +- sprintf(firmware_name, ++ snprintf(firmware_name, sizeof(firmware_name), + "allo/piano/2.2/allo-piano-dsp-%d-%d-%d.bin", + rate, ((lowpass * 10) + 60), dac); + } else { /* low */ +- sprintf(firmware_name, ++ snprintf(firmware_name, sizeof(firmware_name), + "allo/piano/2.%d/allo-piano-dsp-%d-%d-%d.bin", +- mode, rate, ((lowpass * 10) + 60), dac); ++ (mode - 1), rate, ((lowpass * 10) + 60), dac); + } + + dev_info(codec->dev, "Dsp Firmware File Name: %s\n", +@@ -199,6 +218,80 @@ static int snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, + return ret; + } + ++static int snd_allo_piano_dual_mode_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct glb_pool *glb_ptr = card->drvdata; ++ ++ ucontrol->value.integer.value[0] = glb_ptr->dual_mode; ++ ++ return 0; ++} ++ ++static int snd_allo_piano_dual_mode_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct glb_pool *glb_ptr = card->drvdata; ++ struct snd_soc_pcm_runtime *rtd; ++ struct snd_card *snd_card_ptr = card->snd_card; ++ struct snd_kcontrol *kctl; ++ struct soc_mixer_control *mc; ++ unsigned int left_val = 0; ++ ++ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ ++ if (ucontrol->value.integer.value[0] > 0) { ++ glb_ptr->dual_mode = ucontrol->value.integer.value[0]; ++ glb_ptr->set_mode = 0; ++ } else if (ucontrol->value.integer.value[0] <= 0) { ++ if (glb_ptr->set_mode <= 0) { ++ glb_ptr->dual_mode = 1; ++ glb_ptr->set_mode = 0; ++ } ++ } else { ++ glb_ptr->dual_mode = 0; ++ return 0; ++ } ++ ++ if (glb_ptr->dual_mode == 1) { ++ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x01); ++ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x10); ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_3, 0xff); ++ ++ list_for_each_entry(kctl, &snd_card_ptr->controls, list) { ++ if (!strncmp(kctl->id.name, "Digital Playback Volume", ++ sizeof(kctl->id.name))) { ++ mc = (struct soc_mixer_control *) ++ kctl->private_value; ++ mc->rreg = mc->reg; ++ break; ++ } ++ } ++ } else { ++ left_val = snd_soc_read(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_2); ++ list_for_each_entry(kctl, &snd_card_ptr->controls, list) { ++ if (!strncmp(kctl->id.name, "Digital Playback Volume", ++ sizeof(kctl->id.name))) { ++ mc = (struct soc_mixer_control *) ++ kctl->private_value; ++ mc->rreg = PCM512x_DIGITAL_VOLUME_3; ++ break; ++ } ++ } ++ ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_3, left_val); ++ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); ++ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x00); ++ } ++ ++ return 0; ++} ++ + static int snd_allo_piano_mode_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) + { +@@ -215,8 +308,30 @@ static int snd_allo_piano_mode_put(struct snd_kcontrol *kcontrol, + struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); + struct snd_soc_pcm_runtime *rtd; + struct glb_pool *glb_ptr = card->drvdata; ++ struct snd_card *snd_card_ptr = card->snd_card; ++ struct snd_kcontrol *kctl; ++ struct soc_mixer_control *mc; ++ unsigned int left_val = 0; + + rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ ++ if ((glb_ptr->dual_mode == 1) && ++ (ucontrol->value.integer.value[0] > 0)) { ++ left_val = snd_soc_read(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_2); ++ list_for_each_entry(kctl, &snd_card_ptr->controls, list) { ++ if (!strncmp(kctl->id.name, "Digital Playback Volume", ++ sizeof(kctl->id.name))) { ++ mc = (struct soc_mixer_control *) ++ kctl->private_value; ++ mc->rreg = PCM512x_DIGITAL_VOLUME_3; ++ break; ++ } ++ } ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_3, left_val); ++ } ++ + return(snd_allo_piano_dsp_program(rtd, + ucontrol->value.integer.value[0], + glb_ptr->set_rate, glb_ptr->set_lowpass)); +@@ -344,6 +459,11 @@ static const struct snd_kcontrol_new allo_piano_controls[] = { + snd_allo_piano_mode_get, + snd_allo_piano_mode_put), + ++ SOC_ENUM_EXT("Dual Mode Route", ++ allo_piano_dual_mode_enum, ++ snd_allo_piano_dual_mode_get, ++ snd_allo_piano_dual_mode_put), ++ + SOC_ENUM_EXT("Lowpass Route", allo_piano_enum, + snd_allo_piano_lowpass_get, + snd_allo_piano_lowpass_put), +@@ -472,7 +592,7 @@ static int snd_allo_piano_dac_hw_params( + PCM512x_RATE_DET_4); + if (val < 0) { + dev_err(rtd->codec_dais[dac]->codec->dev, +- "Failed to read register PCM512x_RATE_DET_4\n"); ++ "Failed to read register PCM512x_RATE_DET_4\n"); + return val; + } + +@@ -482,7 +602,7 @@ static int snd_allo_piano_dac_hw_params( + PCM512x_SREF_BCK); + + dev_info(rtd->codec_dais[dac]->codec->dev, +- "Setting BCLK as input clock & Enable PLL\n"); ++ "Setting BCLK as input clock & Enable PLL\n"); + } else { + snd_soc_write(rtd->codec_dais[dac]->codec, + PCM512x_PLL_EN, +@@ -493,7 +613,7 @@ static int snd_allo_piano_dac_hw_params( + PCM512x_SREF_SCK); + + dev_info(rtd->codec_dais[dac]->codec->dev, +- "Setting SCLK as input clock & disabled PLL\n"); ++ "Setting SCLK as input clock & disabled PLL\n"); + } + } + +@@ -504,6 +624,7 @@ static int snd_allo_piano_dac_hw_params( + dev_warn(card->dev, "Failed to set volume limit: %d\n", + ret); + } ++ + ret = snd_allo_piano_dsp_program(rtd, glb_ptr->set_mode, rate, + glb_ptr->set_lowpass); + if (ret < 0) +@@ -521,6 +642,7 @@ static int snd_allo_piano_dac_prepare( + struct snd_soc_card *card = rtd->card; + + snd_allo_piano_gpio_unmute(card); ++ + return 0; + } + + +From fa26bbbbb313785aead28ef505844b19c0bd5561 Mon Sep 17 00:00:00 2001 +From: Matthijs Kooijman +Date: Sun, 9 Jul 2017 15:15:22 +0200 +Subject: [PATCH 169/171] overlays: Add gpio-shutdown overlay (#2103) + +This overlay facilitates the addition of a powerbutton by converting +GPIO edges into KEY_POWER keypresses, which can be handled by +systemd-logind to shut down the system. + +Signed-off-by: Matthijs Kooijman +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 32 +++++++++ + .../boot/dts/overlays/gpio-shutdown-overlay.dts | 80 ++++++++++++++++++++++ + 3 files changed, 113 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts + +diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile +index 8a3131f5a4bc90d4a597b416416953e8e49d41ec..c50b1dfa9d7334df47ce087f9d2a7a816afa05ba 100644 +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -30,6 +30,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + googlevoicehat-soundcard.dtbo \ + gpio-ir.dtbo \ + gpio-poweroff.dtbo \ ++ gpio-shutdown.dtbo \ + hifiberry-amp.dtbo \ + hifiberry-dac.dtbo \ + hifiberry-dacplus.dtbo \ +diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README +index a69e3a0d8dce1633598dd3cd8e00cad9509eee03..e6d777a601c91d192bc5713f9a73e1a2d4d708ef 100644 +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -508,6 +508,38 @@ Params: gpiopin GPIO for signalling (default 26) + will also cause the pin to go low. + + ++Name: gpio-shutdown ++Info: Initiates a shutdown when GPIO pin changes. The given GPIO pin ++ is configured as an input key that generates KEY_POWER events. ++ This event is handled by systemd-logind by initiating a ++ shutdown. Systemd versions older than 225 need an udev rule ++ enable listening to the input device: ++ ++ ACTION!="REMOVE", SUBSYSTEM=="input", KERNEL=="event*", \ ++ SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", \ ++ ATTRS{keys}=="116", TAG+="power-switch" ++ ++ This overlay only handles shutdown. After shutdown, the system ++ can be powered up again by driving GPIO3 low. The default ++ configuration uses GPIO3 with a pullup, so if you connect a ++ button between GPIO3 and GND (pin 5 and 6 on the 40-pin header), ++ you get a shutdown and power-up button. ++Load: dtoverlay=gpio-shutdown,= ++Params: gpio_pin GPIO pin to trigger on (default 3) ++ ++ active_low When this is 1 (active low), a falling ++ edge generates a key down event and a ++ rising edge generates a key up event. ++ When this is 0 (active high), this is ++ reversed. The default is 1 (active low). ++ ++ gpio_pull Desired pull-up/down state (off, down, up) ++ Default is "up". ++ ++ Note that the default pin (GPIO3) has an ++ external pullup. ++ ++ + Name: hifiberry-amp + Info: Configures the HifiBerry Amp and Amp+ audio cards + Load: dtoverlay=hifiberry-amp +diff --git a/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts b/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..863fb395c8539734b658682b900e1fbd96c9443e +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts +@@ -0,0 +1,80 @@ ++// Definitions for gpio-poweroff module ++/dts-v1/; ++/plugin/; ++ ++// This overlay sets up an input device that generates KEY_POWER events ++// when a given GPIO pin changes. It defaults to using GPIO3, which can ++// also be used to wake up (start) the Rpi again after shutdown. Since ++// wakeup is active-low, this defaults to active-low with a pullup ++// enabled, but all of this can be changed using overlay parameters (but ++// note that GPIO3 has an external pullup on at least some boards). ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ // Configure the gpio pin controller ++ target = <&gpio>; ++ __overlay__ { ++ // Define a pinctrl state, that sets up the gpio ++ // as an input with a pullup enabled. This does ++ // not take effect by itself, only when referenced ++ // by a "pinctrl client", as is done below. See: ++ // https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt ++ // https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt ++ pin_state: shutdown_button_pins { ++ brcm,pins = <3>; // gpio number ++ brcm,function = <0>; // 0 = input, 1 = output ++ brcm,pull = <2>; // 0 = none, 1 = pull down, 2 = pull up ++ }; ++ }; ++ }; ++ fragment@1 { ++ // Add a new device to the /soc devicetree node ++ target-path = "/soc"; ++ __overlay__ { ++ shutdown_button { ++ // Let the gpio-keys driver handle this device. See: ++ // https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt ++ compatible = "gpio-keys"; ++ ++ // Declare a single pinctrl state (referencing the one declared above) and name it ++ // default, so it is activated automatically. ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pin_state>; ++ ++ // Enable this device ++ status = "okay"; ++ ++ // Define a single key, called "shutdown" that monitors the gpio and sends KEY_POWER ++ // (keycode 116, see ++ // https://github.com/torvalds/linux/blob/v4.12/include/uapi/linux/input-event-codes.h#L190) ++ button: shutdown { ++ label = "shutdown"; ++ linux,code = <116>; // KEY_POWER ++ gpios = <&gpio 3 1>; ++ }; ++ }; ++ }; ++ }; ++ ++ // This defines parameters that can be specified when loading ++ // the overlay. Each foo = line specifies one parameter, named ++ // foo. The rest of the specification gives properties where the ++ // parameter value is inserted into (changing the values above ++ // or adding new ones). ++ __overrides__ { ++ // Allow overriding the GPIO number. ++ gpio_pin = <&button>,"gpios:4", ++ <&pin_state>,"brcm,pins:0"; ++ ++ // Allow changing the internal pullup/down state. 0 = none, 1 = pulldown, 2 = pullup ++ // Note that GPIO3 and GPIO2 are the I2c pins and have an external pullup (at least ++ // on some boards). ++ gpio_pull = <&pin_state>,"brcm,pull:0"; ++ ++ // Allow setting the active_low flag. 0 = active high, 1 = active low ++ active_low = <&button>,"gpios:8"; ++ }; ++ ++}; + +From c3288ddc556c8f8d1773dfe08db00da85a91367e Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Mon, 10 Jul 2017 11:05:17 +0200 +Subject: [PATCH 170/171] config: enable generic S/PDIF codec drivers (#2104) + +These drivers can be used as dummy ADC/DAC drivers for +attaching general codecs that don't need to be configured. + +This option will build 2 additional drivers, spdif_receiver +and spdif_transmitter. + +Since these drivers have DT bindings they are handy for quick +testing of I2S peripherals with simple-audio-card. + +eg: + +fragment@0 { + target-path = "/"; + __overlay__ { + dummy_receiver: spdif-receiver { + #address-cells = <0>; + #size-cells = <0>; + #sound-dai-cells = <0>; + compatible = "linux,spdif-dir"; + status = "okay"; + }; + }; +}; + +Signed-off-by: Matthias Reichl +--- + arch/arm/configs/bcm2709_defconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index bd26ebc59b14b8f4fe8b89992e507ee35ed75047..1cd3337442d75e26f1d4f7370b60cdaf8aac64b2 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -900,6 +900,7 @@ CONFIG_SND_PISOUND=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_ADAU7002=m + CONFIG_SND_SOC_AK4554=m ++CONFIG_SND_SOC_SPDIF=m + CONFIG_SND_SOC_WM8804_I2C=m + CONFIG_SND_SIMPLE_CARD=m + CONFIG_HIDRAW=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index cead8c64336bb4ce9656bb20384069917695852d..7c1be0e035105724a7774ac59e5195a098b51796 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -894,6 +894,7 @@ CONFIG_SND_PISOUND=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_ADAU7002=m + CONFIG_SND_SOC_AK4554=m ++CONFIG_SND_SOC_SPDIF=m + CONFIG_SND_SOC_WM8804_I2C=m + CONFIG_SND_SIMPLE_CARD=m + CONFIG_HIDRAW=y + +From 2bd630c9dfbc88b101c7e178b47a722d7eeac424 Mon Sep 17 00:00:00 2001 +From: Bilal Amarni +Date: Wed, 24 May 2017 10:52:50 +0200 +Subject: [PATCH 171/171] [ARM64] enable drivers for GPIO expander and vcio + +--- + arch/arm64/configs/bcmrpi3_defconfig | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig +index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621b2a49f12 100644 +--- a/arch/arm64/configs/bcmrpi3_defconfig ++++ b/arch/arm64/configs/bcmrpi3_defconfig +@@ -575,6 +575,8 @@ CONFIG_SERIO_RAW=m + CONFIG_GAMEPORT=m + CONFIG_GAMEPORT_NS558=m + CONFIG_GAMEPORT_L4=m ++CONFIG_BRCM_CHAR_DRIVERS=y ++CONFIG_BCM_VCIO=y + # CONFIG_BCM2835_DEVGPIOMEM is not set + # CONFIG_BCM2835_SMI_DEV is not set + # CONFIG_LEGACY_PTYS is not set +@@ -609,6 +611,7 @@ CONFIG_PPS=m + CONFIG_PPS_CLIENT_LDISC=m + CONFIG_PPS_CLIENT_GPIO=m + CONFIG_GPIO_SYSFS=y ++CONFIG_GPIO_BCM_EXP=y + CONFIG_GPIO_BCM_VIRT=y + CONFIG_GPIO_ARIZONA=m + CONFIG_GPIO_STMPE=y