diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index e6f23eec85..7af00967b1 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 cba37f230efcd867e7ac6b1309793ff5f581cc5f Mon Sep 17 00:00:00 2001 +From b3c40c9c236a5f42aa9f67729c0fd012f968b224 Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 001/172] smsx95xx: fix crimes against truesize +Subject: [PATCH 001/201] 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 5f19fb0f025d9449d0ba20958610e0d1f083f032..ed28f1c3e1d0f2559a62a1c289937944 usbnet_skb_return(dev, ax_skb); } -From 2dc4097eaeb9ba3c9f7a514811f5cc79398f5fe6 Mon Sep 17 00:00:00 2001 +From 4aa34a38a4826c9a7b811ac621441083c13d8878 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 002/172] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 002/201] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -94,10 +94,10 @@ index ed28f1c3e1d0f2559a62a1c28993794497730c5d..f758e122c65685799d4aeeb1c3e6ca81 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 4d8007b449783b04155b896263f742cc54743948 Mon Sep 17 00:00:00 2001 +From 2f5a48b5f07e582138e59d5d23d5791655cc9fc0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 003/172] Allow mac address to be set in smsc95xx +Subject: [PATCH 003/201] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -193,10 +193,10 @@ index f758e122c65685799d4aeeb1c3e6ca81df0d7980..f6661e388f6e801c1b88e48a3b71407b eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From 700d38a66aaa4f20af7818a059e7f4cabfa24c86 Mon Sep 17 00:00:00 2001 +From c91dea3477e7d55c0fd1c6d3d5beab1ef65591f0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 004/172] Protect __release_resource against resources without +Subject: [PATCH 004/201] 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 102ee6f78e7aa38ec04c25fc1530e00504334d1b Mon Sep 17 00:00:00 2001 +From a4a299e3d516bbe4209b5bd4fe5c3ab13f9f9d9d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 005/172] mm: Remove the PFN busy warning +Subject: [PATCH 005/201] 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 a2019fc9d94df3af9cf2c5ce1a476949c6822efc..5e6e1815923f212f5c1b1d1a213b0b12 goto done; } -From fcfddcbc752d9065ad8c43d0a5881cbe7f906dbd Mon Sep 17 00:00:00 2001 +From 0fffa379abffd551f99630664360985639315e63 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 006/172] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 006/201] 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 b716b6ffd6eca8049f6547df1bb5b9745ea51193 Mon Sep 17 00:00:00 2001 +From b151637636cd2c776169bc47d5339d76b75bb709 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 007/172] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 007/201] 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 55b7aa30f466410b52b5de588b445fcb8030777b Mon Sep 17 00:00:00 2001 +From 670aabc9797916dce3be0b37edcdd9a07f558470 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/172] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 008/201] 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 0d922c798dadc5d8ae3648105f21a6baeefcb980 Mon Sep 17 00:00:00 2001 +From e8749edbe74dbf48d9d2b54b67c619e2afca3a7f 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/172] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 009/201] 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 c519361f3ebec20f711b41fa0f0c42369805b01e Mon Sep 17 00:00:00 2001 +From 4ae51271e78e6bbea91f8e77bbedaf9d76beac19 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 010/172] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 010/201] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -567,10 +567,10 @@ index 9e2e099baf8ca5cc6510912a36d4ca03daeb8273..e59640942826db2ea14d0bde0ff5ab22 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From b9e6762dc65b5d7d0a653c9b0b9c250fa20710b9 Mon Sep 17 00:00:00 2001 +From 74c3136977cb5d131621a847a2c74cce422655ee Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 3 Jan 2017 18:25:01 +0000 -Subject: [PATCH 011/172] Revert "pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP" +Subject: [PATCH 011/201] 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 ba702187e249b8c0675b3581e0dfb33f3def4492 Mon Sep 17 00:00:00 2001 +From f99f1f13d60f23d407cfda93e4538faad76fe4d5 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 012/172] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 012/201] 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 be5d6f213e3595bff42a015b70a6053a3954386c Mon Sep 17 00:00:00 2001 +From 80a25b7e55eac1f5597f3119cef5865acda86034 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 26 Feb 2015 09:58:22 +0000 -Subject: [PATCH 013/172] pinctrl-bcm2835: Only request the interrupts listed +Subject: [PATCH 013/201] 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 d7e18cba30297793f22ddeeeda7adbdb2d92281d Mon Sep 17 00:00:00 2001 +From c0a490cd264bf8fac52dd9b578e87e32a831474c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 014/172] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 014/201] 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 70e2fcaa3ab012133ca158a0d4754f4614efe767 Mon Sep 17 00:00:00 2001 +From 1b9b5dcb13fe3d6ae0e85d059197d19a32f4599e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 015/172] spi-bcm2835: Disable forced software CS +Subject: [PATCH 015/201] 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 e3d3419354f85b19f215b0993d9172f81dc3c035 Mon Sep 17 00:00:00 2001 +From 22a237840b1b24200c0527fb17c48fb70ff42bcb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 016/172] spi-bcm2835: Remove unused code +Subject: [PATCH 016/201] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -1131,10 +1131,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 1a1347be71be4328bf59c65a6cd55aff43e51929 Mon Sep 17 00:00:00 2001 +From 1b9aa9f28c9a96f98fa2618cfb5ab41c1cd933ca 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/172] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 017/201] 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 745a7ff6fea65b6b780daa60e2ef45b1c2564e6e Mon Sep 17 00:00:00 2001 +From 8e75b6da26cd4b48d0011c0319951c214e61c5bc 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/172] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 018/201] 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 2dadc180b9bf8701d235a191417b4158240f01b0 Mon Sep 17 00:00:00 2001 +From f293533f302199a30afab749998118a9bfceb662 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 019/172] firmware: Updated mailbox header +Subject: [PATCH 019/201] firmware: Updated mailbox header --- include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ @@ -1357,10 +1357,10 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, -From 7504e04d9fef1209e784da04c4bbc51106bcc9c2 Mon Sep 17 00:00:00 2001 +From f372b659a16c7cf5e9cc50cff05b2b21b30bfda9 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 020/172] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 020/201] 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 eaf9c7c12759e84330190ac0a93ce8e5ae44163b Mon Sep 17 00:00:00 2001 +From 9f717c79b11b89003d2714369735e2d0026495b2 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/172] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 021/201] 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 e2198aafb79e38240a2a30dff5553739852a9cf4 Mon Sep 17 00:00:00 2001 +From 8ff14d61a2b837a1c3041dfb03c36f1d67c09646 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 022/172] reboot: Use power off rather than busy spinning when +Subject: [PATCH 022/201] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1511,10 +1511,10 @@ index 3fa867a2aae672755c6ce6448f4148c989dbf964..80dca8dcd6709034b643c6a3f35729e0 /* -From 79a5defcd581e2ccf204fa176edec988e29b0c4b Mon Sep 17 00:00:00 2001 +From 91f4d81d17611635cd3a890a660e03ba80a77617 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 023/172] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 023/201] 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 ffb58ee3a7eaa2c088344b17411d84af020cd3c1 Mon Sep 17 00:00:00 2001 +From 0ab9d485fbdb2fb6bbad39358f25284c6de33807 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 024/172] Register the clocks early during the boot process, so +Subject: [PATCH 024/201] 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 221fd24597ec8ba97659ee9d3ce39db77a1b3066 Mon Sep 17 00:00:00 2001 +From 69154440daa87a44fa85fcff56b48f128f688783 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 025/172] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 025/201] 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 e1369707aee4eb098a285253f8e293a138cd605c Mon Sep 17 00:00:00 2001 +From 46b1099e60530369c12d90091f2dae23d617e7ff Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 026/172] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 026/201] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1633,10 +1633,10 @@ index afe3fd3af1e40616857b3e6c425be632c1fa2667..b2bbad417f0c4499a5f49081c8f996b9 esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From 846bad9fc71bf6d60c13cf32b0df010bc309bf6c Mon Sep 17 00:00:00 2001 +From f67fe8f081360069a13568dc702e40d8e8cfa22b Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 027/172] BCM2835_DT: Fix I2S register map +Subject: [PATCH 027/201] 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 b022ddef4dc371f3886d064513e072a068b39024 Mon Sep 17 00:00:00 2001 +From f691621f68dc8b502e4814b83411f4222e543060 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 028/172] clk-bcm2835: Mark used PLLs and dividers CRITICAL +Subject: [PATCH 028/201] 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 79604af2e2d2d0599db57bdfe31c0f43476893e7 Mon Sep 17 00:00:00 2001 +From c5ab3fa093d04f3c83366f7befa7891a8454c8f1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 029/172] clk-bcm2835: Add claim-clocks property +Subject: [PATCH 029/201] 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 8453d4b710d2c5428354bd6aa8e6e3e48deed5bf Mon Sep 17 00:00:00 2001 +From 845240891bc7a98833e748dd6efbd7f371ad2398 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:06:53 +0000 -Subject: [PATCH 030/172] clk-bcm2835: Correct the prediv logic +Subject: [PATCH 030/201] 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 aafd6807e821bd7512e60d567cf5952d5380ce3c Mon Sep 17 00:00:00 2001 +From f5ee2487ad1b03738f880e49ee769e9e7455b4a5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 -Subject: [PATCH 031/172] clk-bcm2835: Read max core clock from firmware +Subject: [PATCH 031/201] 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 7cc5a0f803b064d2fed550b2030e2072536a7695 Mon Sep 17 00:00:00 2001 +From ec0cd3d4c98dc4b108578b330bfc3179a8b777bc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 032/172] sound: Demote deferral errors to INFO level +Subject: [PATCH 032/201] 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 98d60f471c5d705d383c5edca4850bd8facdd030..d2da3077fd980c846c1c86697f73c342 goto _err_defer; } -From 99f6ed1efd99cad3e64cc4a6862ee9e16aa02abb Mon Sep 17 00:00:00 2001 +From d7d56082807508531b8d54b2f37c103449cd4a79 Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 -Subject: [PATCH 033/172] Update vfpmodule.c +Subject: [PATCH 033/201] 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 7889e94b155370906965095bafff5070ce00cb00 Mon Sep 17 00:00:00 2001 +From 58c120d5315e7e63ca0593936c5e151c5d9f4462 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 -Subject: [PATCH 034/172] ASoC: bcm2835_i2s.c: relax the ch2 register setting +Subject: [PATCH 034/201] 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 ff5fd2722bd82c609ee1e119608862fe4e1f1e6d Mon Sep 17 00:00:00 2001 +From c861b9955afeb984a8ed17f8934a89cd9c5dd5a4 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/172] i2c: bcm2835: Add debug support +Subject: [PATCH 035/201] 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 351b6dfc0c8a7de8a1832b8d9ada59592ce6714b Mon Sep 17 00:00:00 2001 +From 9bc9d0e50f455e0d14a03049be42b7d6b95c57ed Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 036/172] Main bcm2708/bcm2709 linux port +Subject: [PATCH 036/201] 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 9389b85099a6d066ecd540c8b4124d9703bda346 Mon Sep 17 00:00:00 2001 +From 6f93aba037b521caeef861484fd06f840ca063b9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 037/172] Add dwc_otg driver +Subject: [PATCH 037/201] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -63611,10 +63611,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From 20dbadf99cf8a4cf36f7fc95e2d18035646f4c63 Mon Sep 17 00:00:00 2001 +From 52fc4db10b0ee563db739454d0c47913169685cf Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 10 May 2017 12:47:46 +0100 -Subject: [PATCH 038/172] dwcotg: Allow to build without FIQ on ARM64 +Subject: [PATCH 038/201] dwcotg: Allow to build without FIQ on ARM64 Signed-off-by: popcornmix --- @@ -63635,10 +63635,10 @@ index ed0cd59de37e8f47369f86dba751c78933722abc..53aedbe9727ca5c34e46f5cf998f14c7 The Synopsis DWC controller is a dual-role host/peripheral/OTG ("On The Go") USB controllers. -From 6eff19baa84da7dff8b5d94956ffb1daa5ab8269 Mon Sep 17 00:00:00 2001 +From 001758b066b1a1320dc05f649801daec355e6e60 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 039/172] bcm2708 framebuffer driver +Subject: [PATCH 039/201] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67097,10 +67097,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 d4139c87ae0676d41e2b883b17dd4703a629d7c8 Mon Sep 17 00:00:00 2001 +From 4a30528e5bc1a9816d099f44e230a69155863447 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 040/172] dmaengine: Add support for BCM2708 +Subject: [PATCH 040/201] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67731,10 +67731,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From 0d7ff352109f3c2b9c6525844ff19f02b1b0978b Mon Sep 17 00:00:00 2001 +From 92beebae951cf05cee20a9927e18f082cdd1ae85 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 041/172] MMC: added alternative MMC driver +Subject: [PATCH 041/201] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -69456,10 +69456,10 @@ index 0000000000000000000000000000000000000000..4fe8d1fe44578fbefcd48f8c327ba3d0 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Gellert Weisz"); -From 14d4f4323856f88122f75b597088622a50873b70 Mon Sep 17 00:00:00 2001 +From f06a6a2b5c114eddffe9772f72ab70e42f949cdb Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 042/172] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 042/201] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -71855,10 +71855,10 @@ index 0000000000000000000000000000000000000000..a9bc79bfdbb71807819dfe2d8f165144 +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From 6f48d98726c00a1e2da54dbe5484766094c83424 Mon Sep 17 00:00:00 2001 +From 623d1a949eca24e30a84dd80f16c591911c2bc0f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 043/172] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 043/201] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -72383,10 +72383,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From 13d0bd6e14e868d08b54e60239dcbe73d560a111 Mon Sep 17 00:00:00 2001 +From da428fd6b69561696ab41c9d8f22c09db398a44f Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 044/172] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 044/201] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -76823,10 +76823,10 @@ index 0000000000000000000000000000000000000000..334f36d0d697b047df2922b5f2db67f3 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From 19e3234988742e80780c0ac74ea9683aa878f7e9 Mon Sep 17 00:00:00 2001 +From ad532f4a1c6a0c94cefa266b930b194698e134af Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 045/172] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 045/201] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -77134,10 +77134,10 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 9cca281c0fa998d7e52c4b5a41080497fce07426 Mon Sep 17 00:00:00 2001 +From be01f3cd6c4139da0855f745addfdbf1e8abee66 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 046/172] Add SMI driver +Subject: [PATCH 046/201] Add SMI driver Signed-off-by: Luke Wren --- @@ -79088,10 +79088,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From cc402171edc8698bb38b2cde8c25d31952d13402 Mon Sep 17 00:00:00 2001 +From b4dfaf63a6b288ecf1958a2cc173e6575bcf125e Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 047/172] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 047/201] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -79261,10 +79261,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From d4d2301c3e4d2526cd4e41a3aa3631bff1d7dc0a Mon Sep 17 00:00:00 2001 +From 230f7ac8ce7c72ae525b4c8bfae734c959b86c53 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 048/172] Add SMI NAND driver +Subject: [PATCH 048/201] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -79629,10 +79629,10 @@ index 0000000000000000000000000000000000000000..02adda6da18bd0ba9ab19a104975b79d + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 965f519ed5bc722708734c3920286cfc3b218fdc Mon Sep 17 00:00:00 2001 +From 610688ad76f3b657313d627c3bc73483d63df295 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 049/172] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 049/201] 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 @@ -80495,10 +80495,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From 23c0798c89d295f8e3aea50becb10a27d672c281 Mon Sep 17 00:00:00 2001 +From 314962d978fd282b345089543371b2a8c5702994 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 050/172] Add cpufreq driver +Subject: [PATCH 050/201] Add cpufreq driver Signed-off-by: popcornmix --- @@ -80765,10 +80765,10 @@ index 0000000000000000000000000000000000000000..414fbdc10dfbfc6e4bb47870a7af3fd5 +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 0943c506c42919dbb505fb8d358c0d501f9271ee Mon Sep 17 00:00:00 2001 +From 3fb95f1b015430409208896c34dd21978b03a2c3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 051/172] Added hwmon/thermal driver for reporting core +Subject: [PATCH 051/201] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -80934,10 +80934,10 @@ index 0000000000000000000000000000000000000000..c63fb9f9d143e19612a18fe530c7b2b3 +MODULE_DESCRIPTION("Thermal driver for bcm2835 chip"); +MODULE_LICENSE("GPL"); -From f6008f4b4ce90204371b2e2bfc8e8c9ac561e4e8 Mon Sep 17 00:00:00 2001 +From 41a3b9f846104ebe3f8423b87ce015b26ebeaa3c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 052/172] Add Chris Boot's i2c driver +Subject: [PATCH 052/201] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81602,10 +81602,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From ef19a1fb6d320698c954dc3198cb66a98520e6f9 Mon Sep 17 00:00:00 2001 +From 459a850222550cb38f683477771eb9cf1aa9f7c9 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 053/172] char: broadcom: Add vcio module +Subject: [PATCH 053/201] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81830,10 +81830,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 7cacac3072868cce466f7a98f397a2be2aecd4cb Mon Sep 17 00:00:00 2001 +From 33de43017b26a39fdde4eb47b53d2123dd0651eb 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 054/172] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 054/201] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -81916,10 +81916,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From 95a558dd017a654f4e6e2f2df0323f799d66de03 Mon Sep 17 00:00:00 2001 +From f3fe45bfef5319a9e9626457d681a768817f2fbc Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 055/172] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 055/201] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -82439,10 +82439,10 @@ index 0000000000000000000000000000000000000000..60206de7fa9a49bd027c635306674a29 + return $trailer; +} -From a7f1ffdee86153fc696f5ce431e3ba96fa9c4c72 Mon Sep 17 00:00:00 2001 +From de5b4d9fbcb736f4d296059066609c252f863790 Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 056/172] BCM2708: Add core Device Tree support +Subject: [PATCH 056/201] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -93741,10 +93741,10 @@ index 7234e61e7ce370a775ec6981b391b6d102a01770..1b53cd59e4875d388e4974a3399d5f07 # Bzip2 -From d149970fa36b92a17a489f3750e73b13064d0d55 Mon Sep 17 00:00:00 2001 +From 6c677c885d5d883c233239ad71f8b5f245cf2d0a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 057/172] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 057/201] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -93920,10 +93920,10 @@ index 38c0bd7ca1074af234d516275791d05f945ce1f0..2f026646d24bad617c73aa79db30c9aa /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From 74ad535336548b33116d1d8bd48bf14b76a79b46 Mon Sep 17 00:00:00 2001 +From 2a4f5898ae6aeb9de3161ce74d1e9d39398f0f60 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 058/172] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 058/201] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -94175,10 +94175,10 @@ index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..703fa8a70574323abe2fb32599254582 __u32 dx; /* screen-relative */ __u32 dy; -From 4a3349de06fe25730ad85697eabcb82ba0f9da64 Mon Sep 17 00:00:00 2001 +From 6e3af0c60ad9568ae60a166ab36f3031c0e49b0d Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 059/172] Speed up console framebuffer imageblit function +Subject: [PATCH 059/201] 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 @@ -94387,10 +94387,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 62ddb449a6eda9797476d7a0cc4f8fb8632dfddf Mon Sep 17 00:00:00 2001 +From 8bd2babe134290bbe4eefaac1f78414a5df14cd3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 060/172] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 060/201] 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 @@ -94640,10 +94640,10 @@ index d58594a3232492e33f1dd4babd3798b03e0f0203..feae94256256316fd9d850c3d83325af unsigned int ext_pullup_enable_pin; unsigned int pullup_duration; -From 0f7c19950b6d1df4e50978f68f863566f0a49cdc Mon Sep 17 00:00:00 2001 +From 51bf71a7bc924a23b7f0ae2ad959c1427a5fac87 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 061/172] hid: Reduce default mouse polling interval to 60Hz +Subject: [PATCH 061/201] hid: Reduce default mouse polling interval to 60Hz Reduces overhead when using X --- @@ -94679,10 +94679,10 @@ index 961bc6fdd2d908835fa9a07d169a4746fb44189d..c595188a1156a27aa79f111d81636b6d ret = -ENOMEM; if (usb_endpoint_dir_in(endpoint)) { -From 4ed9ed7a6d49f5f4767fbc3e0b76c6d7b7dcf9bd Mon Sep 17 00:00:00 2001 +From 83ec68fbd8234d9a03e2563f9ff5531f930a1184 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 062/172] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 062/201] 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 @@ -95040,10 +95040,10 @@ index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From c62a6314f7bebb3a8cdf1409ce24a10b95d0b6c5 Mon Sep 17 00:00:00 2001 +From fda63eaba81ccc39fe134ca4348f7ca97e821a74 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 063/172] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 063/201] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -96618,10 +96618,10 @@ index 333dc3c2e5ffbb2c5ab8fcfb6115b6162643cf20..46b787a6474ffa857da9b663948863ec bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From 6e290f07e08bbcba58d280cbfd08c6edc254017f Mon Sep 17 00:00:00 2001 +From 97c8f17cc5acdda6daa4a38d09436ee17e765c8b Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 064/172] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 064/201] 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 @@ -96656,10 +96656,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From 6d7c6199e669d7fd82a9636505ea69047afcff2d Mon Sep 17 00:00:00 2001 +From 07437f006154bd25039fa5aae4894b9acf6e33b8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 065/172] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 065/201] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -97524,10 +97524,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From 782e8a825497cc9241209086f8926c494064ae99 Mon Sep 17 00:00:00 2001 +From 66311c52dc91d135cfb0b11e428759e7620b6f59 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 066/172] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 066/201] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -97702,10 +97702,10 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From aa777e5e25ea7346a8a685f0b1987f0313406d54 Mon Sep 17 00:00:00 2001 +From e391f2c63b333496cc71038c427acdfe408e2ddc Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 067/172] ASoC: Add support for Rpi-DAC +Subject: [PATCH 067/201] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -97989,10 +97989,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From e199dc943984763ef3c06587b05e74476b4e00ed Mon Sep 17 00:00:00 2001 +From 62c23903d39d3efbcaa85e9ed855b9a157e5e02a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 068/172] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 068/201] 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 @@ -98041,10 +98041,10 @@ index af95d648265b3e92e345101542b332aee35191d4..513f56ba132929662802d15cdc653af3 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From ef15e4bb0e7eef3e15a02c10cc456bcaf2b8cc7b Mon Sep 17 00:00:00 2001 +From 64821dfaafc9af2671f32370ef98f1dd90d385c5 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 069/172] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 069/201] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -98388,10 +98388,10 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From 84ca2f1f288d5be9d01a92d3dad1aff4a4989417 Mon Sep 17 00:00:00 2001 +From 823da604b4f014ad52d1afd92a5c863604fce1f8 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 070/172] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 070/201] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -98726,10 +98726,10 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From 1179904e04673805fe64e7f757ecaa5b5109f8ba Mon Sep 17 00:00:00 2001 +From ee2697e89fef222c4080c2ccb97c5f7b42813dff Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 071/172] Added support for HiFiBerry DAC+ +Subject: [PATCH 071/201] 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. @@ -99359,10 +99359,10 @@ index 72b19e62f6267698aea45d2410d616d91c1825cb..c6839ef6e16754ed9de2698507b8986a dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From e9c272ddb7aa2307fa2a8b175289562c0e4a4d66 Mon Sep 17 00:00:00 2001 +From 7e378410d3195d25bdb2705d6f83e1648a21ca6a Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 072/172] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 072/201] 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. @@ -100197,10 +100197,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 0b88e9f7ccbfcbc6d7e7dc226787012e9bc712bd Mon Sep 17 00:00:00 2001 +From 7294abb878db7e0027240fd0073ac6cbdc432369 Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Sat, 31 Jan 2015 18:25:49 -0700 -Subject: [PATCH 073/172] Update ds1307 driver for device-tree support +Subject: [PATCH 073/201] Update ds1307 driver for device-tree support Signed-off-by: Ryan Coe --- @@ -100227,10 +100227,10 @@ index 4ad97be480430babc3321075f2739114eaad8f04..2ac1c265dc9cea56a5949eb537949a1f .driver = { .name = "rtc-ds1307", -From c20bd956bd7c7f81788c1ca52ba6877b593c5962 Mon Sep 17 00:00:00 2001 +From a632b3ebdf36d654e47032a26f58dbbe1545342c Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 074/172] Add driver for rpi-proto +Subject: [PATCH 074/201] 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 @@ -100445,10 +100445,10 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From 4daa4a346865a02049dbba9de4f7dbf165827f14 Mon Sep 17 00:00:00 2001 +From 6d5b55040552f8b4278b272b563834ec3a98011b Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 075/172] RaspiDAC3 support +Subject: [PATCH 075/201] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -100691,10 +100691,10 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 4c5033c3011845dd9fc997251baff644988fa639 Mon Sep 17 00:00:00 2001 +From 7f95ba2b3e96ee6250ae85e03f9a8113e174dbd4 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 076/172] Add Support for JustBoom Audio boards +Subject: [PATCH 076/201] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -101150,10 +101150,10 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From 47203585a01cb33ed17880bab137f3578a90f62f Mon Sep 17 00:00:00 2001 +From f0219f39e043ac9d1458b406e9bb7b42caef26da Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 077/172] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 077/201] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -101335,10 +101335,10 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 1a6f4c5742473c754f028789e7a8add9b5cc99a4 Mon Sep 17 00:00:00 2001 +From c1005d5dbfb62ef2f267b8ad8fd73d3b5a64d17a Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 078/172] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 078/201] 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. @@ -101589,10 +101589,10 @@ index 0000000000000000000000000000000000000000..ef54e0f07ea03f59e9957b5d98f3e7fd +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From 89e63d5a68a55f0f80ef4cc6796140e3032ba514 Mon Sep 17 00:00:00 2001 +From 28aa9198b399aaef19ea45707124bcce733af6f7 Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 079/172] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 079/201] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -101892,10 +101892,10 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From 931f5ef2db9f20c590f2336fb45e9f1c1e06a4b8 Mon Sep 17 00:00:00 2001 +From deee181df5f90701a549a60eaaa500f126ce0e4e Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 080/172] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 080/201] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -102368,10 +102368,10 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From d8410ff5810f2031d9609575d1abbf796a37e5b4 Mon Sep 17 00:00:00 2001 +From cfc57b5190f95b6c05bdb7a527e5149dfab99d3f Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 081/172] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 081/201] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -102544,10 +102544,10 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From af1317eb8df0560f05515cfe808ce5b071db748d Mon Sep 17 00:00:00 2001 +From e41e30435844cbcf8a7fa120e1eec5e410d6a05b Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 082/172] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 082/201] 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, @@ -102754,10 +102754,10 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 35c8b0bf87ce7be86810af72aa3495de4c16867e Mon Sep 17 00:00:00 2001 +From 5090538b81af66170a70bd299304d4b0b6de7a67 Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 083/172] Support for Blokas Labs pisound board +Subject: [PATCH 083/201] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -103956,10 +103956,10 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From 86a4993d6547875cb6a4877714e9f43eeee57ef4 Mon Sep 17 00:00:00 2001 +From 0e03e398cbfa8cda03c8e254a458994d27896c14 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 084/172] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 084/201] 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 @@ -105024,10 +105024,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From 380db971c26af4f64fbc3476be9646b4a2d282db Mon Sep 17 00:00:00 2001 +From 9dfaba24eb2f95358049451be344a706a5812ff3 Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 -Subject: [PATCH 085/172] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT +Subject: [PATCH 085/201] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT Signed-off-by: Miquel Blauw --- @@ -105221,10 +105221,10 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From ad3fcef7140156ac6fc06849c592a7483780fe8a Mon Sep 17 00:00:00 2001 +From bcc3b29f175263aa05758a1b9b6d925370fbd853 Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 -Subject: [PATCH 086/172] Add support for Fe-Pi audio sound card. (#1867) +Subject: [PATCH 086/201] 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. @@ -105438,10 +105438,10 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From c62facc1d4f9bbb81bb8f7478e71776be80208d5 Mon Sep 17 00:00:00 2001 +From 9c070c8d1220a7baf7d396eeb3c412ce08b76b7e Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 -Subject: [PATCH 087/172] Add support for the AudioInjector.net Octo sound card +Subject: [PATCH 087/201] Add support for the AudioInjector.net Octo sound card --- sound/soc/bcm/Kconfig | 7 + @@ -105781,10 +105781,10 @@ index 0000000000000000000000000000000000000000..9effea725798640887755dfa688da453 +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From af6ad3dafb31058d93f00e11e39d13bd691c2cd6 Mon Sep 17 00:00:00 2001 +From 6d6dd4985b165d7eb33340375d9b5c4ac958c55f Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 088/172] rpi_display: add backlight driver and overlay +Subject: [PATCH 088/201] 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 @@ -105953,10 +105953,10 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From 2cd78573346e3036d623c85c6866b3b9af69671e Mon Sep 17 00:00:00 2001 +From a44d41ad64f67bb19cae5c5e4207aac1720a6edd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 089/172] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 089/201] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. @@ -106230,10 +106230,10 @@ index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d6 RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, -From 0b304c39ab00e62b9d78fed0e617ec2f0a965f0c Mon Sep 17 00:00:00 2001 +From 5f1621dad78d24013bf260e6fb9fdf1541a10a1d Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 -Subject: [PATCH 090/172] bcm2835-gpio-exp: Driver for GPIO expander via +Subject: [PATCH 090/201] bcm2835-gpio-exp: Driver for GPIO expander via mailbox service Pi3 and Compute Module 3 have a GPIO expander that the @@ -106561,10 +106561,10 @@ index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3 /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 6883c7d1af3a91c7671e40e22d3f5e7ac755da2b Mon Sep 17 00:00:00 2001 +From bc3c97a3c3c965ec9cbabfc6103c7d17ab06098a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 091/172] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 091/201] 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 @@ -106593,10 +106593,10 @@ index f2503d862f3aee25396ef002ba69968896316779..a85e81245004e928fc52ec59044e151b uap->old_cr = 0; uap->port.dev = dev; -From a9fa6f6084d6d6e40072b2c3b58929579b469ae4 Mon Sep 17 00:00:00 2001 +From 7429cebc12b402d92cbfb39ff384bd5735716db5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 -Subject: [PATCH 092/172] amba_pl011: Round input clock up +Subject: [PATCH 092/201] 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 @@ -106682,10 +106682,10 @@ index a85e81245004e928fc52ec59044e151b7f183496..380d2c2e19ae3720924e906261b487ad /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From 0781c225a5b632975bdd64f9f3537d8d26066bb4 Mon Sep 17 00:00:00 2001 +From b59c2ab633847e0f529c02ff1e4a982537daa35c Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 093/172] OF: DT-Overlay configfs interface +Subject: [PATCH 093/201] 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. @@ -107117,10 +107117,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 0fb35dff05c9853a5b16b129b13f54483633a340 Mon Sep 17 00:00:00 2001 +From 5d2a0fd664b8df6dd783cb169adf254cac7e592b Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 094/172] brcm: adds support for BCM43341 wifi +Subject: [PATCH 094/201] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -107166,7 +107166,7 @@ Signed-off-by: Phil Elwell 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -index 944b83cfc51978d06ccc82a9f23ce64472af3fc8..b285024b754c9a6eb915d4a7c9e09126e1ecbea0 100644 +index 017e20b343047a85e9447fdf5c28414a102e084e..7bed37e32aea708ab191781adfdf989c2d6519fe 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -2747,6 +2747,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, @@ -107197,7 +107197,7 @@ index 944b83cfc51978d06ccc82a9f23ce64472af3fc8..b285024b754c9a6eb915d4a7c9e09126 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) brcmf_fil_iovar_int_set(ifp, "mbss", 0); brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY, -@@ -6687,12 +6692,18 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], +@@ -6686,12 +6691,18 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], struct brcmfmac_pd_cc *country_codes; struct brcmfmac_pd_cc_entry *cc; s32 found_index; @@ -107218,7 +107218,7 @@ index 944b83cfc51978d06ccc82a9f23ce64472af3fc8..b285024b754c9a6eb915d4a7c9e09126 } if ((alpha2[0] == ccreq->country_abbrev[0]) && -@@ -6716,10 +6727,14 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], +@@ -6715,10 +6726,14 @@ static s32 brcmf_translate_country_code(struct brcmf_pub *drvr, char alpha2[2], brcmf_dbg(TRACE, "No country code match found\n"); return -EINVAL; } @@ -107271,10 +107271,10 @@ index 67bff5b8cd6067de4eaa9458b16f8da6ec6eb885..7a8d881a3c5aa7c633e3e557c8860874 BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From 0e1d7d754372551210b66d9b34e9d61ca656377a Mon Sep 17 00:00:00 2001 +From 30aea75fcdf5250a885dc350c312e30ea84ae732 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 -Subject: [PATCH 095/172] brcmfmac: Mute expected startup 'errors' +Subject: [PATCH 095/201] brcmfmac: Mute expected startup 'errors' The brcmfmac WiFi driver always complains about the '00' country code and the firmware version is reported as an error. Modify the driver to @@ -107287,10 +107287,10 @@ Signed-off-by: Phil Elwell 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -index b285024b754c9a6eb915d4a7c9e09126e1ecbea0..808ab269746121d35bcd175d26ecfb5a0d9c394d 100644 +index 7bed37e32aea708ab191781adfdf989c2d6519fe..11412dabb9e6b436267cfa06dbbc6f93bdf721e1 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -6754,6 +6754,8 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, +@@ -6753,6 +6753,8 @@ static void brcmf_cfg80211_reg_notifier(struct wiphy *wiphy, /* ignore non-ISO3166 country codes */ for (i = 0; i < sizeof(req->alpha2); i++) if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') { @@ -107313,10 +107313,10 @@ index 6221b046bca44211e2dfac24119097f7ac09e829..634602e0c44f91da06db7aa803dbee69 /* locate firmware version number for ethtool */ ptr = strrchr(buf, ' ') + 1; -From 19f79219bdb68af3efeabca3bbcaebb2e402f8ad Mon Sep 17 00:00:00 2001 +From 59b277a061657d34966008bcbfe0f10c9a0459a1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 096/172] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 096/201] 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. @@ -107339,10 +107339,10 @@ index 90d0456b67446bcc624fab4b1542c4eaf21531b1..f9adeac3bbba6418dcca298c55706356 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 5810ea5ae3fa9f869b555794605e61455e8fd98b Mon Sep 17 00:00:00 2001 +From b3cfc4ef30c58a3c1d946c520929cb40734a8f9e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 097/172] config: Add default configs +Subject: [PATCH 097/201] config: Add default configs --- arch/arm/configs/bcm2709_defconfig | 1309 +++++++++++++++++++++++++++++++++++ @@ -109990,10 +109990,10 @@ index 0000000000000000000000000000000000000000..046f3e8757ef0f794c802171690528d3 +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From a551dbb12fe75c9978a2a713c0a66712e55a7d56 Mon Sep 17 00:00:00 2001 +From 5c565678db35fe11b061450f162e4855cd43d8f9 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 098/172] Add arm64 configuration and device tree differences. +Subject: [PATCH 098/201] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -111408,10 +111408,10 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From bd84783a61fbfdcaeb269c63095b364a1c3aff62 Mon Sep 17 00:00:00 2001 +From 5e14da47343a92409e363bcdf139373d58b6a3ff Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 099/172] raspberrypi-firmware: Define the MBOX channel in the +Subject: [PATCH 099/201] raspberrypi-firmware: Define the MBOX channel in the header. Signed-off-by: Eric Anholt @@ -111433,10 +111433,10 @@ index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e5586 enum rpi_firmware_property_status { -From 0d801aeace86547fc7ab719f21dfbf20d352757c Mon Sep 17 00:00:00 2001 +From 381c36ab28537b3b43c1b6a187cc4be5bbe91b05 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 100/172] raspberrypi-firmware: Export the general transaction +Subject: [PATCH 100/201] raspberrypi-firmware: Export the general transaction function. The vc4-firmware-kms module is going to be doing the MBOX FB call. @@ -111480,10 +111480,10 @@ index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1d #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From 811a7eaaf352f2d6ff6835497ce37f5e64a406b0 Mon Sep 17 00:00:00 2001 +From a0bccca0cb330b699552a1e4cf1626b455140a82 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 101/172] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 101/201] 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. @@ -111887,10 +111887,10 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From d70bfbe00aaba533fb9f2c531f510c89f0479eb7 Mon Sep 17 00:00:00 2001 +From 02bcb9fbcd015556bff0e167ca0577142d14362f Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 -Subject: [PATCH 102/172] ARM64: Enable HDMI audio and vc04_services in +Subject: [PATCH 102/201] ARM64: Enable HDMI audio and vc04_services in bcmrpi3_defconfig Signed-off-by: Michael Zoran @@ -111919,10 +111919,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From 3bba53d05b7e2b8a9646c6ab4966039b6db8ab3a Mon Sep 17 00:00:00 2001 +From e3b623412d32bfdebc4e79f06acc557139e6640f Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 -Subject: [PATCH 103/172] ARM64: Run bcmrpi3_defconfig through savedefconfig. +Subject: [PATCH 103/201] ARM64: Run bcmrpi3_defconfig through savedefconfig. Signed-off-by: Michael Zoran --- @@ -111967,10 +111967,10 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From 20ef4d26489383e581e2036fc5a1f73a8116d080 Mon Sep 17 00:00:00 2001 +From 958b8236ff048f39797ac761ab98515d7c9141a8 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 104/172] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 104/201] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -112002,10 +112002,10 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 6fc513f155903c9578406263408ca1bd0ec5cbc3 Mon Sep 17 00:00:00 2001 +From 3b9ffd08922d5e0c1a3d4ad8d921b8847728eea0 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 105/172] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 105/201] 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 @@ -112030,10 +112030,10 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From 5e1602b536e71d81cefa1e438e6b6f5733ddcc2c Mon Sep 17 00:00:00 2001 +From df34a6950729bbe9c3fc2221ba1638f317bad30d Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 106/172] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 106/201] 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 @@ -112376,10 +112376,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From 2d199ab26441d46278125d73b106594703afe8ae Mon Sep 17 00:00:00 2001 +From bb6893e76c628834e5803049d8eed27611735d9a Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 107/172] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 107/201] 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 @@ -112453,10 +112453,10 @@ index c4e151451cf8c8ebde5225515eac2786d6f61d46..9a7ee04ee0d9b7aa734cf3159ed59c19 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From adf92e16091278926830b3d7a96d9a9a44241331 Mon Sep 17 00:00:00 2001 +From 49dca43ac754d288c95132cde68131bae9250654 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 108/172] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 108/201] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -112477,10 +112477,10 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From 7538b323ead0a1543b3fb2566fdff2c866eb67b4 Mon Sep 17 00:00:00 2001 +From 1537e2f9beedfaf9689f2531aaef14c985f5a5e7 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 -Subject: [PATCH 109/172] ARM64: Force hardware emulation of deprecated +Subject: [PATCH 109/201] ARM64: Force hardware emulation of deprecated instructions. --- @@ -112508,10 +112508,10 @@ index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..0cb830d30fb6d2bd26ab572efe893649 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From c01103bc6e2b06dad90bd7c4bf3c8a461bd7b661 Mon Sep 17 00:00:00 2001 +From c50df61c12f3e83451b13433a7efcb4b6e8fdb8a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 -Subject: [PATCH 110/172] build/arm64: Add rules for .dtbo files for dts +Subject: [PATCH 110/201] build/arm64: Add rules for .dtbo files for dts overlays We now create overlays as .dtbo files. @@ -112536,10 +112536,10 @@ index b9a4a934ca057623e0ea436fd9b2c7c0f675fced..54e3c38d6fd877827541cdc798de035c dtbs: prepare scripts -From 890b4b429c8571bc18e48f0e5c6ebdc3998c5c90 Mon Sep 17 00:00:00 2001 +From 6af6fc308eb595dec8c4d4c0e1b1458a3ec0ec92 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 111/172] clk: bcm2835: Mark GPIO clocks enabled at boot as +Subject: [PATCH 111/201] clk: bcm2835: Mark GPIO clocks enabled at boot as critical. These divide off of PLLD_PER and are used for the ethernet and wifi @@ -112577,10 +112577,10 @@ index 39f72da6ba1f6ec6ec41d5dc1bf46344aab008da..fe3298b54cdfb96bd90fb4f39e13921d * rate changes on at least of the parents. */ -From 7e6372d06c365e9413f8011db1535d77799b993a Mon Sep 17 00:00:00 2001 +From 54438d7276c3d555130b4af1bcfc5a46d2f1eb61 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 24 Feb 2015 13:40:50 +0000 -Subject: [PATCH 112/172] pinctrl-bcm2835: Fix interrupt handling for GPIOs +Subject: [PATCH 112/201] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and 46-53 Contrary to the documentation, the BCM2835 GPIO controller actually has @@ -112613,10 +112613,10 @@ index 6351fe7f8e314ac5ebb102dd20847b383fd5b857..28745af5aadf3cb91fa7ff39118385c3 }, }; -From 85e8d3328539d595c0d18c97acde2a5e93a6ccc6 Mon Sep 17 00:00:00 2001 +From f52010f1acdd3eac9ef78c4f330768758cba2b48 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Mar 2017 12:18:20 +0000 -Subject: [PATCH 113/172] BCM270X_DT: Invert Pi3 power LED to match fw change +Subject: [PATCH 113/201] BCM270X_DT: Invert Pi3 power LED to match fw change Firmware expgpio driver reworked due to complaint over hotplug detect. @@ -112642,10 +112642,10 @@ index 616cfd5c7094596b497101e8feca25e25e77c3e8..9f001bccb8261563dcddd8dec94b056b }; -From 00ff88c7d3653e002c2d0c4557b2786cedc46468 Mon Sep 17 00:00:00 2001 +From a68defe1c376c70f9f78e2de95957836c67d476a Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 14 Mar 2017 14:23:06 +0000 -Subject: [PATCH 114/172] bcm2835-gpio-exp: Copy/paste error adding base twice +Subject: [PATCH 114/201] bcm2835-gpio-exp: Copy/paste error adding base twice brcmexp_gpio_set was adding gpio->gc.base to the offset twice, so passing an invalid number to the mailbox service. @@ -112671,10 +112671,10 @@ index 681a91492d4c33bdfd42416e069218e8611cc4d9..d68adafaee4ad406f45f4ff0d6b7c1ad set.state = val; /* Output state */ -From 41c5f24ed441bd19580c99c6762452df772aeb30 Mon Sep 17 00:00:00 2001 +From 98c25801986023ce12e404aea6277810a6e3cccd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 Mar 2017 13:40:41 +0000 -Subject: [PATCH 115/172] config: disable MMC driver temporarily for now. +Subject: [PATCH 115/201] config: disable MMC driver temporarily for now. Currently causes a breakage to sdhost driver. However when MMC is disabled Pi3 wifi will not work --- @@ -112709,10 +112709,10 @@ index 046f3e8757ef0f794c802171690528d31fee9deb..f2e0a58a96c8550f110c5940bf65f4d0 CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y -From c4db25eb1c034f1932b667c503d9c800de76bfab Mon Sep 17 00:00:00 2001 +From 1ec16d57a2d7aeb246e197e1d5421e70e81757b1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Mar 2017 12:24:41 +0000 -Subject: [PATCH 116/172] config: Make spidev a loadable module +Subject: [PATCH 116/201] config: Make spidev a loadable module spidev isn't required early in the boot process, and not all users need it (spi_bcm2835 is a module), so make it a loadable module. @@ -112752,10 +112752,10 @@ index f2e0a58a96c8550f110c5940bf65f4d022cc4548..9eb7084f440c8aac0c6257ee678007c2 CONFIG_PPS_CLIENT_LDISC=m CONFIG_PPS_CLIENT_GPIO=m -From 5558f85d30e7e162bfa8dfb6620ec2a6b3e82867 Mon Sep 17 00:00:00 2001 +From 0c69b5674a5fa18c08bf0934eecebf30f36dfbec Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 -Subject: [PATCH 117/172] ASoC: Add prompt for ICS43432 codec +Subject: [PATCH 117/201] 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 @@ -112780,10 +112780,10 @@ index 55812b0b884cf4fc4e86680b11fedd11c863db7a..428dc05edbb99f50560b7f89e45501c5 config SND_SOC_INNO_RK3036 tristate "Inno codec driver for RK3036 SoC" -From e514545a7e7c05bb3a9c4fae28339298f643ad87 Mon Sep 17 00:00:00 2001 +From 26994396c20027a60fff7a4b1b44161a161a07a7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 -Subject: [PATCH 118/172] bcm2835-aux: Add aux interrupt controller +Subject: [PATCH 118/201] 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 @@ -112947,10 +112947,10 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From f8f06d01bd6cbb2ac3857c3a8977afda187a6d54 Mon Sep 17 00:00:00 2001 +From 29bdc7ea6f73e49f5fbd065fe7dab85f436e90e2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 17:08:44 +0000 -Subject: [PATCH 119/172] BCM270X_DT: Enable AUX interrupt controller in DT +Subject: [PATCH 119/201] BCM270X_DT: Enable AUX interrupt controller in DT See: https://github.com/raspberrypi/linux/issues/1484 https://github.com/raspberrypi/linux/issues/1573 @@ -113003,10 +113003,10 @@ index 72cb9dc60ca9ad9aa2813972a299c50dcea7cd89..ca47b23ffbcd06063e0fb7072dc8a843 #address-cells = <1>; #size-cells = <0>; -From ee9a3fa1b93ba7a3a645b09b6fc48d54d4cc9b5b Mon Sep 17 00:00:00 2001 +From 7145ecff08452f1f69ec0ee8d865a9ea8a802aa2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 27 Mar 2017 17:40:45 +0100 -Subject: [PATCH 120/172] mkknlimg: Find some more downstream-only strings +Subject: [PATCH 120/201] mkknlimg: Find some more downstream-only strings See: https://github.com/raspberrypi/linux/issues/1920 @@ -113037,10 +113037,10 @@ index 60206de7fa9a49bd027c635306674a29a568652f..84be2593ec1de8f97b0167ff06b3e05d my $res = try_extract($kernel_file, $tmpfile1); -From 3b5bf4492bd9d9bf1b61fb2f2e4f498cecf96832 Mon Sep 17 00:00:00 2001 +From 8a84dd6e7a52d8389e2b99d4eeb77cb67314ddda Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 29 Apr 2016 10:32:17 -0700 -Subject: [PATCH 121/172] mmc: read mmc alias from device tree +Subject: [PATCH 121/201] mmc: read mmc alias from device tree To get the SD/MMC host device ID, read the alias from the device tree. @@ -113097,10 +113097,10 @@ index 3f8c85d5aa094b43666904c7dbbe5e62c9763c19..4dbd0e8e27a496bfbe67d188cf795ecc kfree(host); return NULL; -From de493463c9380c44a19090b8cc12c6eeaa24715f Mon Sep 17 00:00:00 2001 +From 3fb7eafa36ac86d56badaa58dc7156e933861ed6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Mar 2017 14:30:42 +0100 -Subject: [PATCH 122/172] BCM270X_DT: Add numbered aliases for SD/MMC devices +Subject: [PATCH 122/201] BCM270X_DT: Add numbered aliases for SD/MMC devices In order to force a specific ID assignment to SD/MMC devices, add numbered aliases to the DT: sdhost -> mmc0, mmc -> mmc1 @@ -113131,10 +113131,10 @@ index ef14e9ac6cd2092efb1681682dd2d3c52b8abfd5..693d4c04a36d2a7883cc3d8916bf0efb i2c2 = &i2c2; usb = &usb; -From 027e783b2d7ca83d723abd27b58d62cfcdddc0d3 Mon Sep 17 00:00:00 2001 +From 969fb962facb304aacbda52476536410888f2ae8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Mar 2017 14:28:53 +0100 -Subject: [PATCH 123/172] config: Re-enable the bcm2835-mmc driver +Subject: [PATCH 123/201] config: Re-enable the bcm2835-mmc driver With the patch to assign mmc device IDs based on DT aliases and appropriate aliases in the rpi DTBs, it is now safe to re-enable @@ -113171,10 +113171,10 @@ index 9eb7084f440c8aac0c6257ee678007c23990a8ae..021c38a909e71baa135cbcd4f3fb80fa CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y -From d754e1c0827d8049e241ba3a5c5afa3e79572daf Mon Sep 17 00:00:00 2001 +From ed1c12e0c9a4bdf31ab6aeeb4aa2f7e42930292a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 May 2016 12:50:33 +0100 -Subject: [PATCH 124/172] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards +Subject: [PATCH 124/201] 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, @@ -113316,10 +113316,10 @@ index 77e61e0a216a2728dd5cfecf55299402ac03c384..d12e8ddd22cb96e38b30f1ac3f9a6bd0 unsigned int erase_shift; /* if erase unit is power 2 */ unsigned int pref_erase; /* in sectors */ -From 758190815bc43f023ba7a6f1d6c85f0d46625283 Mon Sep 17 00:00:00 2001 +From 539f16e7cbdc63f563c167465bd843d9809acd37 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 29 Mar 2017 16:08:29 +0100 -Subject: [PATCH 125/172] bcm2835-sdhost: mmc_card_blockaddr fix +Subject: [PATCH 125/201] bcm2835-sdhost: mmc_card_blockaddr fix Get the definition of mmc_card_blockaddr from drivers/mmc/core/card.h. @@ -113346,10 +113346,10 @@ index a9bc79bfdbb71807819dfe2d8f1651445997f92a..9c6f199a7830959f31012d86bc1f8b1a #define SDCMD 0x00 /* Command to SD card - 16 R/W */ -From 74cb319edfe7f5bf1008bdcc3b9fbfbabc98c9bf Mon Sep 17 00:00:00 2001 +From c5eaa6eb7f4fc1c8d188bee7908f1e0f258274f4 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Mar 2017 12:30:37 +0000 -Subject: [PATCH 126/172] thermal: Compatible strings for bcm2836, bcm2837 +Subject: [PATCH 126/201] thermal: Compatible strings for bcm2836, bcm2837 The upstream dt-bindings documentation for bcm2835-thermal (which exists even though the driver isn't upstreamed) says to use @@ -113381,10 +113381,10 @@ index c63fb9f9d143e19612a18fe530c7b2b3518a22a4..25b78c3eac1503fbc9e679b963a6284b }; MODULE_DEVICE_TABLE(of, bcm2835_thermal_of_match_table); -From c7eedcd7d64d05f4d018dafe00d517ece05f5f6e Mon Sep 17 00:00:00 2001 +From 75e31e501c08dc34a2956980433c93d8eeac142b Mon Sep 17 00:00:00 2001 From: John Greb Date: Wed, 8 Mar 2017 15:12:29 +0000 -Subject: [PATCH 127/172] Match dwc2 device-tree fifo sizes to the hardware +Subject: [PATCH 127/201] Match dwc2 device-tree fifo sizes to the hardware values. Since commit aa381a7259c3f53727bcaa8c5f9359e940a0e3fd was reverted with 3fa9538539ac737096c81f3315a14670b1609092 the g-tx-fifo-size array in the device-tree needs to match the preset values in the bcm2835. @@ -113415,10 +113415,10 @@ index 527abc9f0ddf71f4dc7d58336d87684c931cc2f3..265a16bab008453edba198cf2366c423 }; }; -From f2e17d82ca7da53d7fde536bbbe9f9188ac110f5 Mon Sep 17 00:00:00 2001 +From 74433199ad221183ccd88142934c03f73aa78dea Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Mar 2017 09:10:05 +0000 -Subject: [PATCH 128/172] BCM270X_DT: Add lm75 to i2c-sensor overlay +Subject: [PATCH 128/201] BCM270X_DT: Add lm75 to i2c-sensor overlay See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=177236 @@ -113481,10 +113481,10 @@ index 31bda8da4cb6a56bfe493a81b918900995fb0589..606b2d5012abf2e85712be631c42ea40 }; }; -From 8393cb664ff68d3a9de0f064693837824c5c31d8 Mon Sep 17 00:00:00 2001 +From 41f086576d158c92c72c3653810051df03c459b8 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 28 Mar 2017 14:22:20 +0100 -Subject: [PATCH 129/172] BCM270X_DT: Allow multiple instances of w1-gpio +Subject: [PATCH 129/201] BCM270X_DT: Allow multiple instances of w1-gpio overlays Upcoming firmware will modify the address portion of node names when @@ -113549,10 +113549,10 @@ index 66a98f6c9601f51483f27803995bec772bb3350e..ef8bfbcabdb31231075d5c281df3b38b <&w1_pins>,"brcm,pins:4"; pullup = <&w1>,"rpi,parasitic-power:0"; -From 0092cb58dfed191609ae355a3a74141887b08968 Mon Sep 17 00:00:00 2001 +From ee78a9cc1b0da2dff586a6db56e2bc9bcbebb00f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 28 Mar 2017 17:41:30 +0100 -Subject: [PATCH 130/172] leds-gpio: Remove stray assignment to brightness_set +Subject: [PATCH 130/201] leds-gpio: Remove stray assignment to brightness_set The brightness_set method is intended for use cases that must not block, and can only be used if the GPIO provider can never sleep. @@ -113578,10 +113578,10 @@ index 934cdb1d7bc7f12a4fb06a5c458ad76727c7b7c7..a4df27f6af35ba7f7b34c2a4b7b22ee7 if (template->default_state == LEDS_GPIO_DEFSTATE_KEEP) { state = gpiod_get_value_cansleep(led_dat->gpiod); -From 3893ba12c306f0b3f825b1807511710eb1a75569 Mon Sep 17 00:00:00 2001 +From a92f68c568efd855af9113fb5e114b8895a36d35 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 29 Mar 2017 17:41:04 +0100 -Subject: [PATCH 131/172] config: Add back MMC_BCM2835_DMA +Subject: [PATCH 131/201] config: Add back MMC_BCM2835_DMA --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -113613,10 +113613,10 @@ index 021c38a909e71baa135cbcd4f3fb80fad2151647..a8fc96ef674be476d10e59aef2367def CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y -From 94bb9d5ae6d9c793e0fa21848f5d6ed5a03409ee Mon Sep 17 00:00:00 2001 +From df908baa42047655a8fdd75a30161d48ab919e71 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 27 Mar 2017 22:26:49 +1100 -Subject: [PATCH 132/172] AudioInjector Octo: sample rates, regulators, reset +Subject: [PATCH 132/201] AudioInjector Octo: sample rates, regulators, reset This patch adds new sample rates to the Audioinjector Octo sound card. The new supported rates are (in kHz) : @@ -113782,10 +113782,10 @@ index 9effea725798640887755dfa688da45338718afc..dcf403ab37639ba79e38278d7e4b1ade dai->cpu_dai_name = NULL; dai->cpu_of_node = i2s_node; -From 687d1794246c421abc961b3bc7ce8fe7e480859a Mon Sep 17 00:00:00 2001 +From 5171fd3b095db6d8a08d304725e18670d94397bc Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 -Subject: [PATCH 133/172] Driver support for Google voiceHAT soundcard. +Subject: [PATCH 133/201] Driver support for Google voiceHAT soundcard. --- arch/arm/boot/dts/overlays/Makefile | 1 + @@ -114290,10 +114290,10 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From f16c6b3d8a141d85437778f20f04188d992ced14 Mon Sep 17 00:00:00 2001 +From 58520832e61c937bfc8cc174dde695ea21d50e3f Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 -Subject: [PATCH 134/172] Add support for Allo Piano DAC 2.1 plus add-on board +Subject: [PATCH 134/201] 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. @@ -114921,10 +114921,10 @@ index 0000000000000000000000000000000000000000..f66f42abadbd5f9d3fe000676e8297ed +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From c28e97c50140a28a2f06563625802365afa390d6 Mon Sep 17 00:00:00 2001 +From eb407b76776d5e050c79a789cf6b8f4d6acc87c9 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 -Subject: [PATCH 135/172] Add support for Allo Boss DAC add-on board for +Subject: [PATCH 135/201] Add support for Allo Boss DAC add-on board for Raspberry Pi. (#1924) Signed-off-by: Baswaraj K @@ -115654,10 +115654,10 @@ index 0000000000000000000000000000000000000000..c080e31065d99ab309ab3bdf41a44adf +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From 4dc6f3e5e6e020df2c5c0bf2c9e752c1a2c1d957 Mon Sep 17 00:00:00 2001 +From f1dc5d974bcf2da9d6ac3fb7924358c360ca0c77 Mon Sep 17 00:00:00 2001 From: BabuSubashChandar C Date: Thu, 30 Mar 2017 20:17:27 +0530 -Subject: [PATCH 136/172] Add support for new clock rate and mute gpios. +Subject: [PATCH 136/201] Add support for new clock rate and mute gpios. Signed-off-by: Baswaraj K Reviewed-by: Deepak @@ -116310,10 +116310,10 @@ index c080e31065d99ab309ab3bdf41a44adfdd8f8039..203ab76c7045b081578e23bda1099dd1 } -From 9ff1331c6674eef77c2fc80168fa437bff57d13d Mon Sep 17 00:00:00 2001 +From 5a86175dad19bdbd684999d1419521acf1b8d83d Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Sat, 1 Apr 2017 00:46:52 +0530 -Subject: [PATCH 137/172] Add clock changes and mute gpios (#1938) +Subject: [PATCH 137/201] Add clock changes and mute gpios (#1938) Also improve code style and adhere to ALSA coding conventions. @@ -117006,10 +117006,10 @@ index f66f42abadbd5f9d3fe000676e8297ed91630e47..56e43f98846b41e487b3089813f7edc3 } -From 24f108aa48ad6fc8137fb00708f4cb18997b4514 Mon Sep 17 00:00:00 2001 +From b13a1bed172071bd53b1de0e214b0432dd57dd2c Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 -Subject: [PATCH 138/172] This is the driver for Sony CXD2880 DVB-T2/T tuner + +Subject: [PATCH 138/201] 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. @@ -133141,10 +133141,10 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From 1e4175db6d09052808f1fd6a8a6a7610c0f5aadb Mon Sep 17 00:00:00 2001 +From f91edc03773e2f27667a8268dbb8a58210843d30 Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Thu, 22 Dec 2016 15:34:12 +0900 -Subject: [PATCH 139/172] BCM2708: Add Raspberry Pi TV HAT Device Tree Support +Subject: [PATCH 139/201] BCM2708: Add Raspberry Pi TV HAT Device Tree Support This is an EXAMPLE CODE of Raspberry Pi TV HAT device tree overlay. Although this is not a part of our release code, it has been used to verify @@ -133240,10 +133240,10 @@ index 0000000000000000000000000000000000000000..a68f6f793d8efd8b2e2adf9f2fb6426f + +}; -From 9a9a93cab06c2571740a004c4238c6a2aab56016 Mon Sep 17 00:00:00 2001 +From 937628e26f79da6985036436208fe2414d11ec3a Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 27 Apr 2017 16:24:34 +0100 -Subject: [PATCH 140/172] dwc_otg: make nak_holdoff work as intended with empty +Subject: [PATCH 140/201] dwc_otg: make nak_holdoff work as intended with empty queues If URBs reading from non-periodic split endpoints were dequeued and @@ -133327,10 +133327,10 @@ index c2dff94e8e6edd22e4427aaa1eac7aad972cb6bd..85a6d431ca54b47dc10573aa72d1ad69 } else { uint16_t frame_number = dwc_otg_hcd_get_frame_number(hcd); -From f4b142374898c6f6aeaca7ad90a82abdcfbb1df6 Mon Sep 17 00:00:00 2001 +From 297d1d46960697b954e63af65adb2fb97909dbcd Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 2 May 2017 16:31:15 +0100 -Subject: [PATCH 141/172] dwc_otg: fix split transaction data toggle handling +Subject: [PATCH 141/201] dwc_otg: fix split transaction data toggle handling around dequeues See https://github.com/raspberrypi/linux/issues/1709 @@ -133418,10 +133418,10 @@ index 608e036be2c9484465ab836de70129335d3d2d96..718a1accc0c219a1764ce53d291de6a2 } qtd = DWC_CIRCLEQ_FIRST(&hc->qh->qtd_list); -From ca137e4bade0c311e3955975dc18246c7285662c Mon Sep 17 00:00:00 2001 +From bf370b1ea5d9445bed16e2a5706bce4956e175df Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 May 2017 16:36:05 +0100 -Subject: [PATCH 142/172] vcsm: Treat EBUSY as success rather than SIGBUS +Subject: [PATCH 142/201] vcsm: Treat EBUSY as success rather than SIGBUS Currently if two cores access the same page concurrently one will return VM_FAULT_NOPAGE and the other VM_FAULT_SIGBUS crashing the user code. @@ -133459,10 +133459,10 @@ index fd71d9fbb400d71bb8cfb8672080e7c3053e3ae9..fd2ca788dcd56b1702454d71b7bedd42 } } -From eb690d20f1fd7664b6c5ed931cd197456dab45ef Mon Sep 17 00:00:00 2001 +From 98f95b8d0d39d4ba771f3ecbed9fc693eff57a22 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 4 May 2017 12:58:11 +0100 -Subject: [PATCH 143/172] fiq_fsm: Use correct states when starting isoc OUT +Subject: [PATCH 143/201] fiq_fsm: Use correct states when starting isoc OUT transfers In fiq_fsm_start_next_periodic() if an isochronous OUT transfer @@ -133499,10 +133499,10 @@ index 9304279592cb5b388086ef91cb52f1e9f94868ce..208252645c09d1d17bf07673989f91b7 break; } -From 44a7c4af43695b567ec9785cf471082ee001aed3 Mon Sep 17 00:00:00 2001 +From fe8d23b8ca12c1ed11af8a53a0abca567b9c3566 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 4 May 2017 17:38:22 +0100 -Subject: [PATCH 144/172] bcm2708_fb: Avoid firmware mbox call in vc_mem_copy +Subject: [PATCH 144/201] bcm2708_fb: Avoid firmware mbox call in vc_mem_copy If firmware has locked up it is useful to get vcdbg log out without a firmware mbox response. Issue the mbox call at probe time instead. @@ -133566,10 +133566,10 @@ index 53c5a0bdadb4be9251affdabed66305842a08e72..612293cf9f1bd93ad2f2aefdd7ca0f5e if (ret == 0) { platform_set_drvdata(dev, fb); -From 6ac17568d6d7fc48ea49dfba566a10a0bbd05271 Mon Sep 17 00:00:00 2001 +From 607bbf92d5c4b109fbec7794241dd742ae662761 Mon Sep 17 00:00:00 2001 From: Nisar Sayed Date: Tue, 9 May 2017 18:51:42 +0100 -Subject: [PATCH 145/172] According to RFC 2460, IPv6 UDP calculated checksum +Subject: [PATCH 145/201] According to RFC 2460, IPv6 UDP calculated checksum yields a result of zero must be changed to 0xffff, however this feature is not supported by smsc95xx family hence enable csum offload only for IPv4 TCP/UDP packets. @@ -133614,10 +133614,10 @@ index f6661e388f6e801c1b88e48a3b71407bd70cf56e..b84e98508b5d97165b68dfc30240950e smsc95xx_init_mac_address(dev); -From 3425f056ca79301488d6184a61f6d108892e68b6 Mon Sep 17 00:00:00 2001 +From 002621b894317e5815b5ea539c826c6e0ec71152 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 146/172] drm/vc4: Add a mode for using the closed firmware for +Subject: [PATCH 146/201] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -134384,10 +134384,10 @@ index 0000000000000000000000000000000000000000..d18a1dae51a2275846c9826b5bf1ba57 + }, +}; -From 4be853077c76b8a7776e7a608e1b2c7d6055e342 Mon Sep 17 00:00:00 2001 +From 520d37557a19360ea5f4b75d46847c06c7e7c712 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 -Subject: [PATCH 147/172] drm/vc4: Name the primary and cursor planes in fkms. +Subject: [PATCH 147/201] drm/vc4: Name the primary and cursor planes in fkms. This makes debugging nicer, compared to trying to remember what the IDs are. @@ -134411,10 +134411,10 @@ index d18a1dae51a2275846c9826b5bf1ba57ae97b55c..e49ce68b607a7ffc2329e3235362f3bc if (type == DRM_PLANE_TYPE_PRIMARY) { vc4_plane->fbinfo = -From e797d289edae4870a0aaa8baa05f80c1be884f8d Mon Sep 17 00:00:00 2001 +From 8e7a07a295b31dc23fefb07c3a15c1517236dc81 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 -Subject: [PATCH 148/172] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of +Subject: [PATCH 148/201] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms. Trying to debug weston on fkms involved figuring out what calls I was @@ -134484,10 +134484,10 @@ index e49ce68b607a7ffc2329e3235362f3bc21ed5cbb..dbf065677202fbebf8e3a0cffbe880aa RPI_FIRMWARE_SET_CURSOR_STATE, &packet_state, -From 9148b1c7ce23d4fa3a5057a91e02e4b0bff7c525 Mon Sep 17 00:00:00 2001 +From 68e461490da11b4ed9c91926a5d3139b35bc255f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 -Subject: [PATCH 149/172] drm/vc4: Fix sending of page flip completion events +Subject: [PATCH 149/201] 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 @@ -134529,10 +134529,10 @@ index dbf065677202fbebf8e3a0cffbe880aa42daef3f..da818a207bfa639b8cea48d94bcf4566 static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) -From 0540b101f2da15af96b5e9234cb4e1f283e09e78 Mon Sep 17 00:00:00 2001 +From 159b5e5e4d2d90ee3c8c2105f1167b80344415fd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 10 May 2017 21:39:45 +0100 -Subject: [PATCH 150/172] squash: vc4_firmware_kms fixups +Subject: [PATCH 150/201] squash: vc4_firmware_kms fixups --- drivers/gpu/drm/vc4/vc4_crtc.c | 2 ++ @@ -134582,10 +134582,10 @@ index da818a207bfa639b8cea48d94bcf4566f97db816..35425063cca47a33936c4853f7cc320c vc4_encoder = devm_kzalloc(dev, sizeof(*vc4_encoder), GFP_KERNEL); if (!vc4_encoder) -From 7ee56a9ee94280a1a1a6e9edcfdc4dcf6ca81585 Mon Sep 17 00:00:00 2001 +From dd49765da63547c036d66954a1dc8970892e143f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 -Subject: [PATCH 151/172] vc4_fkms: Apply firmware overscan offset to hardware +Subject: [PATCH 151/201] vc4_fkms: Apply firmware overscan offset to hardware cursor --- @@ -134642,10 +134642,10 @@ index 35425063cca47a33936c4853f7cc320c3630fdb2..ca03b85f27d8c0966acd977cba9c758d return 0; -From 88e2042ef7dcf2a32ec9e1a355a25c63c560dec0 Mon Sep 17 00:00:00 2001 +From 4d4759a85aa7eedf0d40824948ce64f0fbd2c321 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 11 May 2017 16:58:16 +0100 -Subject: [PATCH 152/172] BCM270X_DT: Tidy up mmc, sdhost, sdio overlays +Subject: [PATCH 152/201] BCM270X_DT: Tidy up mmc, sdhost, sdio overlays The mmc, sdhost, sdio and sdio-1bit overlays had a few anachronisms and oddities which were overdue for fixing. @@ -134754,10 +134754,10 @@ index 398bd812c716c9e472fbac5aba4fe882114c65d1..215d5e3e8a8ca4363457fed1f7425427 }; }; -From 7784b743c7e929ea26b83a13c1e180e52827cdb5 Mon Sep 17 00:00:00 2001 +From 695a214f87e0a14dbe799ef96db49db7eebb34b3 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 12 May 2017 12:24:00 +0100 -Subject: [PATCH 153/172] dwc_otg: fix several potential crash sources +Subject: [PATCH 153/201] dwc_otg: fix several potential crash sources On root port disconnect events, the host driver state is cleared and in-progress host channels are forcibly stopped. This doesn't play @@ -134953,10 +134953,10 @@ index 718a1accc0c219a1764ce53d291de6a2b6f93608..cf23baaa388562b5843be4cfa6c206cb release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_URB_COMPLETE); break; -From 76d7aa0e6d46f620ac36060d0c846d7e42bf18a9 Mon Sep 17 00:00:00 2001 +From cc3a633bc9e56544e470bd581d5f6311b1254c23 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 15 May 2017 14:27:48 +0100 -Subject: [PATCH 154/172] dwc_otg: delete hcd->channel_lock +Subject: [PATCH 154/201] dwc_otg: delete hcd->channel_lock The lock serves no purpose as it is only held while the HCD spinlock is already being held. @@ -135108,10 +135108,10 @@ index cf23baaa388562b5843be4cfa6c206cbdc4e780d..a4355afc77b68718fdaba6c5d4be257d /* Try to queue more transfers now that there's a free channel. */ -From eedb48614ec36ce3d191cdb4aa74767646c53282 Mon Sep 17 00:00:00 2001 +From 084bca698daf14d9bc93b5767f564c1f8b2dbde1 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 15 May 2017 14:51:42 +0100 -Subject: [PATCH 155/172] dwc_otg: remove unnecessary dma-mode channel halts on +Subject: [PATCH 155/201] dwc_otg: remove unnecessary dma-mode channel halts on disconnect interrupt Host channels are already halted in kill_urbs_in_qh_list() with the @@ -135179,10 +135179,10 @@ index 5ec991624c7865901b22ea01b9f2c58c8535ecfd..a2dc6337836b2719f4c954edeeb2a713 if(fiq_enable) { -From 002051d57fb0537ebccdb784070389a5f27de98c Mon Sep 17 00:00:00 2001 +From 5970b5469a8039881c24f035220ab0c15f3566b1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 15 May 2017 16:40:05 +0100 -Subject: [PATCH 156/172] config: Add CONFIG_TOUCHSCREEN_GOODIX +Subject: [PATCH 156/201] config: Add CONFIG_TOUCHSCREEN_GOODIX --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -135214,10 +135214,10 @@ index db6589288b6abd6b76b934de07e8976456e14e61..88072e3b55eb230be44f6d23012428ed CONFIG_TOUCHSCREEN_USB_COMPOSITE=m CONFIG_TOUCHSCREEN_STMPE=m -From d3a5bd8d79aeece0a911f9bda45e434217b83a81 Mon Sep 17 00:00:00 2001 +From ca4999f9ee7148944e16fd398553e782ccc1d041 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 18 May 2017 11:40:43 +0100 -Subject: [PATCH 157/172] config: Add FB_TFT_ST7789V module +Subject: [PATCH 157/201] config: Add FB_TFT_ST7789V module --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -135249,10 +135249,10 @@ index 88072e3b55eb230be44f6d23012428eda3de3453..65e3676b48ab0c0f54375ecf875fc255 CONFIG_FB_TFT_TLS8204=m CONFIG_FB_TFT_UC1701=m -From 93dd57a675c6e4c12cef6eeaa2a051741431db00 Mon Sep 17 00:00:00 2001 +From e56dcdccf17a1dd00bd1cf9dbdc0ed16908164a8 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 May 2017 15:58:00 +0100 -Subject: [PATCH 158/172] config: Add CONFIG_TOUCHSCREEN_EDT_FT5X06 +Subject: [PATCH 158/201] config: Add CONFIG_TOUCHSCREEN_EDT_FT5X06 --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -135284,10 +135284,10 @@ index 65e3676b48ab0c0f54375ecf875fc2552c457e09..7381eeba83ecd4a2c956ab2093ece4f8 CONFIG_TOUCHSCREEN_USB_COMPOSITE=m CONFIG_TOUCHSCREEN_STMPE=m -From cf356b0957eade219b6c4b2563d1f743d0205f30 Mon Sep 17 00:00:00 2001 +From f81549fe9d8a2629ae24b91cc72ea686415f3f7e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 May 2017 19:34:52 +0100 -Subject: [PATCH 159/172] config: Add CONFIG_I2C_ROBOTFUZZ_OSIF +Subject: [PATCH 159/201] config: Add CONFIG_I2C_ROBOTFUZZ_OSIF --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -135319,10 +135319,10 @@ index 7381eeba83ecd4a2c956ab2093ece4f8a57c6ea4..35dc0b5084256f2ae755703edc3eb67c CONFIG_SPI_BCM2835=m CONFIG_SPI_BCM2835AUX=m -From 8d94511815d1d2f25ab827ef7f4fa1710a676827 Mon Sep 17 00:00:00 2001 +From 552e00ce5794982b8a54776c5dd9b9af150e5b9a Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 26 Apr 2017 17:28:47 +0100 -Subject: [PATCH 160/172] clk: bcm2835: Limit PCM clock to OSC and PLLD_PER +Subject: [PATCH 160/201] 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 @@ -135367,10 +135367,10 @@ index fe3298b54cdfb96bd90fb4f39e13921d2e1d4356..c24b4defb2b046e4ecdc109befc2b224 [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( .name = "pwm", -From 06629f6b2a9357463afdf7681e83b24b30f1de83 Mon Sep 17 00:00:00 2001 +From 81ade37d9f852e9ee842363b288845a063646bb6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 22 May 2017 13:56:41 +0100 -Subject: [PATCH 161/172] clk: bcm2835: Minimise clock jitter for PCM clock +Subject: [PATCH 161/201] 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. @@ -135495,10 +135495,10 @@ index c24b4defb2b046e4ecdc109befc2b22497060647..db3ba74acf78f4dfec0d2206b58bc7c3 .tcnt_mux = 23), [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( -From 0d2e6008beebe5809d638cd94d4c81d93a30f09f Mon Sep 17 00:00:00 2001 +From acb57269d40c71ae79e8b01d189a0c4769e115d9 Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Wed, 24 May 2017 10:52:50 +0200 -Subject: [PATCH 162/172] [ARM64] enable drivers for GPIO expander and vcio +Subject: [PATCH 162/201] [ARM64] enable drivers for GPIO expander and vcio --- arch/arm64/configs/bcmrpi3_defconfig | 3 +++ @@ -135526,10 +135526,10 @@ index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621 CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_STMPE=y -From 32f61ae52b810d1e32d2bfc482bf4f54bd5228bf Mon Sep 17 00:00:00 2001 +From 7200d2131e7930e52ca8dece530f53af795760f7 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 25 May 2017 16:04:53 +0100 -Subject: [PATCH 163/172] dwc_otg: make periodic scheduling behave properly for +Subject: [PATCH 163/201] dwc_otg: make periodic scheduling behave properly for FS buses If the root port is in full-speed mode, transfer times at 12mbit/s @@ -135700,10 +135700,10 @@ index 85a6d431ca54b47dc10573aa72d1ad69d06f2e36..4b1dd9de99e9e08b2e006fb5f8a7ef92 status = check_max_xfer_size(hcd, qh); if (status) { -From ffaefcb1ed2c66bba942aadb32158e4f1b908a7e Mon Sep 17 00:00:00 2001 +From 013ed0cf44c870b5aaaf4e3eee066139ad8fa060 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 19 May 2017 16:07:23 +0100 -Subject: [PATCH 164/172] serial: 8250: Add CAP_MINI, set for bcm2835aux +Subject: [PATCH 164/201] serial: 8250: Add CAP_MINI, set for bcm2835aux commit d087e7a991f1f61ee2c07db1be7c5cc2aa373f5d upstream. @@ -135776,10 +135776,10 @@ index 579706d36f5c77382cc289d55c2e6290143d6b1d..27e4a15fbe009e45270b5eaf3698bcfd baud = serial8250_get_baud_rate(port, termios, old); -From 5db9df6f41bcf4d2eb4f408813874eef920fd2be Mon Sep 17 00:00:00 2001 +From 038437ec441eecec6ebe7b18fb239c3219b07ea1 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 26 May 2017 12:50:31 +0100 -Subject: [PATCH 165/172] dwc_otg: fiq_fsm: Make isochronous compatibility +Subject: [PATCH 165/201] dwc_otg: fiq_fsm: Make isochronous compatibility checks work properly Get rid of the spammy printk and local pointer mangling. @@ -135843,10 +135843,10 @@ index 38bf5fc792d32352f9e208e0e90f968599b9bc31..71834cf365e67d7ad995bba7869216c4 return 1; } -From d947638dc39f3b6f9d5c51a8bf2e519d00c710bc Mon Sep 17 00:00:00 2001 +From 8ae3ddc526bb80e222ae97b868d58f993b6212fe Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 12 Jun 2017 13:05:43 +0100 -Subject: [PATCH 166/172] config: Add CONFIG_CAN_GS_USB +Subject: [PATCH 166/201] config: Add CONFIG_CAN_GS_USB --- arch/arm/configs/bcm2709_defconfig | 1 + @@ -135878,10 +135878,10 @@ index 35dc0b5084256f2ae755703edc3eb67cab0759ec..42163e2c0b5d5666d49793ac4e074d22 CONFIG_IRLAN=m CONFIG_IRNET=m -From cc0475b17bb70e8e31afe0606ae80f541f2c867d Mon Sep 17 00:00:00 2001 +From 857b98f679d99f10ca9fd632425439a95939fc35 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 12 Jun 2017 16:10:03 +0100 -Subject: [PATCH 167/172] dwc_otg: add module parameter int_ep_interval_min +Subject: [PATCH 167/201] 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. @@ -135963,10 +135963,10 @@ index 4b1dd9de99e9e08b2e006fb5f8a7ef92f20c2553..fe8e8f841f03660c2ad49ab8e66193be DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD QH Initialized\n"); -From 4917be8ff475c3d37583307dc6c750e7f65fbddf Mon Sep 17 00:00:00 2001 +From 8c3c03c5a732dc61702d77c3a777f1fe303e5178 Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 20 Jun 2017 13:44:01 +0100 -Subject: [PATCH 168/172] dwc_otg: fiq_fsm: Add non-periodic TT exclusivity +Subject: [PATCH 168/201] dwc_otg: fiq_fsm: Add non-periodic TT exclusivity constraints Certain hub types do not discriminate between pipe direction (IN or OUT) @@ -136133,10 +136133,10 @@ index 71834cf365e67d7ad995bba7869216c4091c3a74..7710370b30363e3170bf9bf522597c5f st->fsm = FIQ_PER_SSPLIT_STARTED; } else { -From 84b828e90f67bc9354565fc1689faf578cc79b1b Mon Sep 17 00:00:00 2001 +From fd4b878b0e9f0c95692a55bccd27737ec53265e0 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 21 Jun 2017 17:19:04 +0100 -Subject: [PATCH 169/172] serial: 8250: Fix THRE flag usage for CAP_MINI +Subject: [PATCH 169/201] 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 @@ -136180,10 +136180,10 @@ index 27e4a15fbe009e45270b5eaf3698bcfd0baaa1e3..75fcdfdf86df13564247885ade1fd9f0 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) -From 73ee4a166ba9a1221b8c3256be9e3d7b20eefe4d Mon Sep 17 00:00:00 2001 +From b6464f666f9ce8443ab4568749d399e6d251cf7d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 26 May 2017 13:03:41 +0100 -Subject: [PATCH 170/172] BCM270X_DT: Add midi-uart1 overlay +Subject: [PATCH 170/201] 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 @@ -136281,10 +136281,10 @@ index 0000000000000000000000000000000000000000..e0bc410acbff3a7a175dd5d53b3ab0d0 + }; +}; -From e564b20aa2f38b8079866c0511c1bb2e401b4a5e Mon Sep 17 00:00:00 2001 +From 7616e70c98682a587a94ee3ac6e1043cf519c5b5 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Sat, 20 May 2017 22:10:14 +0100 -Subject: [PATCH 171/172] overlays: README: remove vestigial SDIO parameters +Subject: [PATCH 171/201] overlays: README: remove vestigial SDIO parameters Signed-off-by: Phil Elwell --- @@ -136338,10 +136338,10 @@ index ec9e7b1941678796facf625b3770c20ed0b15b25..499cd1920fd373702cfbc9f6e0fcaebc (default on: polling once at boot-time) -From 109416816930d801991e1098cbd62ab2bcc8c99c Mon Sep 17 00:00:00 2001 +From 0200252f49700e547e73b11bb8a3dd5a15bc2ab7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 27 Jun 2017 15:07:14 +0100 -Subject: [PATCH 172/172] SQUASH: mmc: Apply ERASE_BROKEN quirks correctly +Subject: [PATCH 172/201] SQUASH: mmc: Apply ERASE_BROKEN quirks correctly Squash with: mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards @@ -136370,3 +136370,3492 @@ index 05c8d7381fff5ae88531129d9a5ddd554bddb43e..c9d5d644688c1509d7febcff0322fbab END_FIXUP }; + +From 010b0b8a9889d93e8497a3c75f3dcd199a3367dc Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sun, 7 May 2017 11:34:26 +0200 +Subject: [PATCH 173/201] 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 4237b86c27f78c3fe5809ec0d1188c593c08b052 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sun, 7 May 2017 15:30:50 +0200 +Subject: [PATCH 174/201] 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 ee6fc80872dc26aa3e024a453b80219935276995 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sun, 7 May 2017 16:19:54 +0200 +Subject: [PATCH 175/201] 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 9e158af59cc52a97904bac6a88332fefe788e241 Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Sun, 7 May 2017 16:24:57 +0200 +Subject: [PATCH 176/201] 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 4d4c8503cde1fff410b474498c99085232b1795f Mon Sep 17 00:00:00 2001 +From: Matt Flax +Date: Tue, 4 Apr 2017 19:20:59 +1000 +Subject: [PATCH 177/201] 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 92618cbbaa9655f1967c7a61651b5d513d55adf0 Mon Sep 17 00:00:00 2001 +From: Matt Flax +Date: Tue, 4 Apr 2017 19:23:04 +1000 +Subject: [PATCH 178/201] 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 2abacd9ea1a98422ac775be2e84e0c6601b8aec9 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Sun, 23 Apr 2017 19:36:53 +0100 +Subject: [PATCH 179/201] 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 392ede5bec42710b43fc18c85bd83aea4a69283a Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Sun, 23 Apr 2017 19:38:06 +0100 +Subject: [PATCH 180/201] config: Add CONFIG_BMP280 (and CONFIG_BMP280_I2C) + +Signed-off-by: Phil Elwell +--- + arch/arm/configs/bcm2709_defconfig | 5 +++-- + arch/arm/configs/bcmrpi_defconfig | 5 +++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index b59062ce3d980c8b2612722c9d1b7ccc2dab4c7d..e87018cc9aa7d431914dc38d3d3615fa09b81b7e 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -867,6 +867,7 @@ CONFIG_SND_USB_CAIAQ_INPUT=y + CONFIG_SND_USB_6FIRE=m + CONFIG_SND_SOC=m + CONFIG_SND_BCM2835_SOC_I2S=m ++CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m +@@ -880,16 +881,15 @@ CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m +-CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m + CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m + CONFIG_SND_DIGIDAC1_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m + CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m +-CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m ++CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m + CONFIG_SND_PISOUND=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_ADAU7002=m +@@ -1169,6 +1169,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 42163e2c0b5d5666d49793ac4e074d22cc59c286..00a1a4e43ddd9ffe6a119b5a89ecd28f4eac7f6f 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -861,6 +861,7 @@ CONFIG_SND_USB_CAIAQ_INPUT=y + CONFIG_SND_USB_6FIRE=m + CONFIG_SND_SOC=m + CONFIG_SND_BCM2835_SOC_I2S=m ++CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m +@@ -874,16 +875,15 @@ CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m + CONFIG_SND_BCM2708_SOC_RASPIDAC3=m + CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m +-CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m + CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m + CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m + CONFIG_SND_DIGIDAC1_SOUNDCARD=m + CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m + CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m +-CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m ++CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m + CONFIG_SND_PISOUND=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_ADAU7002=m +@@ -1176,6 +1176,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 ae834cef7a749eb181540ff40757761b3754a159 Mon Sep 17 00:00:00 2001 +From: Scott Ellis +Date: Tue, 25 Apr 2017 10:46:09 -0400 +Subject: [PATCH 181/201] 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 e87018cc9aa7d431914dc38d3d3615fa09b81b7e..c22f2f31ad07a7887c06660f21ebfb1eddf0a8fd 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -656,6 +656,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_THERMAL_BCM2835=y + CONFIG_WATCHDOG=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 00a1a4e43ddd9ffe6a119b5a89ecd28f4eac7f6f..388d0bd8ce36c2028813e7080421f34ab7d7958c 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -650,6 +650,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_THERMAL_BCM2835=y + CONFIG_WATCHDOG=y + +From 5fdcb4a11406777dee7f52b205c0f326b90333b8 Mon Sep 17 00:00:00 2001 +From: Scott Ellis +Date: Tue, 25 Apr 2017 13:05:42 -0400 +Subject: [PATCH 182/201] 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 45f11d4adb03e616e4346f95760e14d78778670e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 8 May 2017 16:30:18 +0100 +Subject: [PATCH 183/201] ARM: dts: bcm283x: Reserve first page for firmware + +The Raspberry Pi startup stub files for multi-core BCM27XX processors +make the secondary CPUs spin until the corresponding mailbox is +written. These stubs are loaded at physical address 0x00000xxx (as seen +by the ARMs), but this page will be reused by the kernel unless it is +explicitly reserved, causing the waiting cores to execute random code. + +Use the /memreserve/ Device Tree directive to mark the first page as +off-limits to the kernel. + +See: https://github.com/raspberrypi/linux/issues/1989 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ---- + arch/arm/boot/dts/bcm283x.dtsi | 2 ++ + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +index 9f001bccb8261563dcddd8dec94b056b55308c6d..eb2d072c77d1791e1182a93f09f694ebb67d85a3 100644 +--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +@@ -1,9 +1,5 @@ + /dts-v1/; + +-#ifdef RPI364 +-/memreserve/ 0x00000000 0x00001000; +-#endif +- + #include "bcm2710.dtsi" + #include "bcm283x-rpi-smsc9514.dtsi" + +diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi +index ca47b23ffbcd06063e0fb7072dc8a843b20256e3..4a13ada772daa457792316ceb455a6028acda292 100644 +--- a/arch/arm/boot/dts/bcm283x.dtsi ++++ b/arch/arm/boot/dts/bcm283x.dtsi +@@ -3,6 +3,8 @@ + #include + #include + ++/memreserve/ 0x00000000 0x00001000; ++ + /* This include file covers the common peripherals and configuration between + * bcm2835 and bcm2836 implementations, leaving the CPU configuration to + * bcm2835.dtsi and bcm2836.dtsi. + +From af20fb159e5466280c61d614b4973612ba8dbf2a Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Mon, 8 May 2017 16:43:40 +0100 +Subject: [PATCH 184/201] 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 fe6ce97b2429a08882b78e9102bcc520c6d48461 Mon Sep 17 00:00:00 2001 +From: Ahmet Inan +Date: Mon, 15 May 2017 17:10:53 +0200 +Subject: [PATCH 185/201] 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 0d0db6d494487e1e40d566d49c29b888a8e3b845 Mon Sep 17 00:00:00 2001 +From: chenzhiwo +Date: Wed, 17 May 2017 16:34:57 +0800 +Subject: [PATCH 186/201] 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 c75918fea2ef596d3ae972e2f40270f4a043a97f Mon Sep 17 00:00:00 2001 +From: Liviu Dudau +Date: Wed, 1 Mar 2017 12:26:28 +0000 +Subject: [PATCH 187/201] ASoC: TLV320AIC23: Unquote NULL from control name + +commit a03faba972cb0f9b3a46d8054e674d5492e06c38 upstream. + +Without this I am getting the following messages at boot on my Trimslice: + tlv320aic23-codec 2-001a: Control not supported for path LLINEIN -> [NULL] -> Line Input + tlv320aic23-codec 2-001a: ASoC: no dapm match for LLINEIN --> NULL --> Line Input + tlv320aic23-codec 2-001a: ASoC: Failed to add route LLINEIN -> NULL -> Line Input + tlv320aic23-codec 2-001a: Control not supported for path RLINEIN -> [NULL] -> Line Input + tlv320aic23-codec 2-001a: ASoC: no dapm match for RLINEIN --> NULL --> Line Input + tlv320aic23-codec 2-001a: ASoC: Failed to add route RLINEIN -> NULL -> Line Input + tlv320aic23-codec 2-001a: Control not supported for path MICIN -> [NULL] -> Mic Input + tlv320aic23-codec 2-001a: ASoC: no dapm match for MICIN --> NULL --> Mic Input + tlv320aic23-codec 2-001a: ASoC: Failed to add route MICIN -> NULL -> Mic Input + tegra-snd-trimslice sound: tlv320aic23-hifi <-> 70002800.i2s mapping ok + +Signed-off-by: Liviu Dudau +Signed-off-by: Mark Brown +--- + sound/soc/codecs/tlv320aic23.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c +index 410cae0f2060474313872d6b9110bf05d3368e43..628a8eeaab689eb85b6d3dba54ec5a98aefe6da0 100644 +--- a/sound/soc/codecs/tlv320aic23.c ++++ b/sound/soc/codecs/tlv320aic23.c +@@ -174,10 +174,9 @@ static const struct snd_soc_dapm_route tlv320aic23_intercon[] = { + {"ROUT", NULL, "Output Mixer"}, + + /* Inputs */ +- {"Line Input", "NULL", "LLINEIN"}, +- {"Line Input", "NULL", "RLINEIN"}, +- +- {"Mic Input", "NULL", "MICIN"}, ++ {"Line Input", NULL, "LLINEIN"}, ++ {"Line Input", NULL, "RLINEIN"}, ++ {"Mic Input", NULL, "MICIN"}, + + /* input mux */ + {"Capture Source", "Line", "Line Input"}, + +From 1b2d861b76b850de65126123871a5d8199f59f25 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 22 May 2017 15:28:27 +0100 +Subject: [PATCH 188/201] config: Add CONFIG_IPV6_ROUTE_INFO + +--- + 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 c22f2f31ad07a7887c06660f21ebfb1eddf0a8fd..ca97073ef5a0aa3dd0c48f313e82abf4f00ba8dd 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -102,6 +102,7 @@ CONFIG_TCP_CONG_ADVANCED=y + CONFIG_TCP_CONG_BBR=m + CONFIG_IPV6=m + CONFIG_IPV6_ROUTER_PREF=y ++CONFIG_IPV6_ROUTE_INFO=y + CONFIG_INET6_AH=m + CONFIG_INET6_ESP=m + CONFIG_INET6_IPCOMP=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 388d0bd8ce36c2028813e7080421f34ab7d7958c..125654dbad226b506db0a9c901a972bfce101264 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -98,6 +98,7 @@ CONFIG_TCP_CONG_ADVANCED=y + CONFIG_TCP_CONG_BBR=m + CONFIG_IPV6=m + CONFIG_IPV6_ROUTER_PREF=y ++CONFIG_IPV6_ROUTE_INFO=y + CONFIG_INET6_AH=m + CONFIG_INET6_ESP=m + CONFIG_INET6_IPCOMP=m + +From e21f67817d9c06a2a109d334fdf3a54ce3829079 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 22 May 2017 13:35:28 +0100 +Subject: [PATCH 189/201] config: Add CONFIG_IPV6_SIT_6RD + +--- + 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 ca97073ef5a0aa3dd0c48f313e82abf4f00ba8dd..b8feb7d9735586cffdbad0252e236c26181b5366 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -106,6 +106,7 @@ CONFIG_IPV6_ROUTE_INFO=y + CONFIG_INET6_AH=m + CONFIG_INET6_ESP=m + CONFIG_INET6_IPCOMP=m ++CONFIG_IPV6_SIT_6RD=y + CONFIG_IPV6_TUNNEL=m + CONFIG_IPV6_MULTIPLE_TABLES=y + CONFIG_IPV6_SUBTREES=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 125654dbad226b506db0a9c901a972bfce101264..354221833db0cb960058e214f03c35dc3442ffdb 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -102,6 +102,7 @@ CONFIG_IPV6_ROUTE_INFO=y + CONFIG_INET6_AH=m + CONFIG_INET6_ESP=m + CONFIG_INET6_IPCOMP=m ++CONFIG_IPV6_SIT_6RD=y + CONFIG_IPV6_TUNNEL=m + CONFIG_IPV6_MULTIPLE_TABLES=y + CONFIG_IPV6_SUBTREES=y + +From 49f7f17230cc9722614ddaf789f4a7d52f54f010 Mon Sep 17 00:00:00 2001 +From: Anton Onishchenko +Date: Tue, 23 May 2017 18:55:46 +0300 +Subject: [PATCH 190/201] 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 b8feb7d9735586cffdbad0252e236c26181b5366..3b09a959efe8094067839af1d32e88886fc7fa07 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -1165,13 +1165,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 354221833db0cb960058e214f03c35dc3442ffdb..58e5c4b87131f3c369e303866276b0633a3e3a08 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -1172,13 +1172,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 e81cee470e44553b53178d2840627e6c000fe06e Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 31 May 2017 09:33:55 +0100 +Subject: [PATCH 191/201] 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 | 2 +- + arch/arm/configs/bcmrpi_defconfig | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig +index 3b09a959efe8094067839af1d32e88886fc7fa07..2de0087789d282dd1931a56d8f50843da0ba0955 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -437,7 +437,6 @@ CONFIG_ISCSI_TCP=m + CONFIG_ISCSI_BOOT_SYSFS=m + CONFIG_MD=y + CONFIG_MD_LINEAR=m +-CONFIG_MD_RAID0=m + CONFIG_BLK_DEV_DM=m + CONFIG_DM_CRYPT=m + CONFIG_DM_SNAPSHOT=m +@@ -653,6 +652,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 58e5c4b87131f3c369e303866276b0633a3e3a08..9e3b9db7662f4a382ed35d91a19f11501361ef55 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -433,7 +433,6 @@ CONFIG_ISCSI_TCP=m + CONFIG_ISCSI_BOOT_SYSFS=m + CONFIG_MD=y + CONFIG_MD_LINEAR=m +-CONFIG_MD_RAID0=m + CONFIG_BLK_DEV_DM=m + CONFIG_DM_CRYPT=m + CONFIG_DM_SNAPSHOT=m +@@ -647,6 +646,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 f5f292fba379ce1a9fc6d71cc651d0d11fe22411 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 31 May 2017 15:27:39 +0100 +Subject: [PATCH 192/201] 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 c9efd017c7ea9afe7d6c68f6350156d72c6051f4 Mon Sep 17 00:00:00 2001 +From: Stefan Tatschner +Date: Mon, 29 May 2017 21:46:16 +0200 +Subject: [PATCH 193/201] 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 8ba84e5a119c0f0bbbf91a8087eaaad0caa345db Mon Sep 17 00:00:00 2001 +From: sandeepal +Date: Fri, 2 Jun 2017 18:59:46 +0530 +Subject: [PATCH 194/201] 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 | 6 + + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/allo-digione.c | 268 +++++++++++++++++++++ + 8 files changed, 329 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 2de0087789d282dd1931a56d8f50843da0ba0955..7434a6ddd94b121f6ffd9cf518d16b9fda5422b1 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -893,6 +893,7 @@ CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m + CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m + CONFIG_SND_PISOUND=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_ADAU7002=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 9e3b9db7662f4a382ed35d91a19f11501361ef55..f13f9fb0a19424bebe5f3c662c92789ca41be509 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -887,6 +887,7 @@ CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m + CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m + CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m + CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m ++CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m + CONFIG_SND_PISOUND=m + CONFIG_SND_SOC_ADAU1701=m + CONFIG_SND_SOC_ADAU7002=m +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index c472f67b6167fecbdc099c1ceaa96b10555e8039..e6ba276dc0058f61259793ef586e0d3beb1b23ec 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -183,6 +183,12 @@ 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_PISOUND + tristate "Support for Blokas Labs pisound" +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 a53f3c0a309ab15e29db835c0b9058724245a485 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Mon, 5 Jun 2017 16:40:38 +0100 +Subject: [PATCH 195/201] 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 11f977365ddcb02cee1f6eea24c00654c1ddda18 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 20 Jun 2017 17:51:47 +0100 +Subject: [PATCH 196/201] 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 3bdab6d94f51bd52d20e8b0fd8eaa70a45dc91e3 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 21 Jun 2017 09:03:51 -0700 +Subject: [PATCH 197/201] 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 bdb7fe051f23ffc9fec0fb4087ad366eb0004d94 Mon Sep 17 00:00:00 2001 +From: Steve Conner +Date: Thu, 29 Jun 2017 15:56:19 +0100 +Subject: [PATCH 198/201] 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 90bdac6880a66d66b651d16ea5667d519b5b8ffc Mon Sep 17 00:00:00 2001 +From: Allo +Date: Mon, 3 Jul 2017 15:45:20 +0530 +Subject: [PATCH 199/201] 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 e0f344367bb28340602c4ffb606429714b6d5c5c Mon Sep 17 00:00:00 2001 +From: Matthijs Kooijman +Date: Sun, 9 Jul 2017 15:15:22 +0200 +Subject: [PATCH 200/201] 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 eb49855922a6506f581c8561c933905e4ae14eaa Mon Sep 17 00:00:00 2001 +From: Matthias Reichl +Date: Mon, 10 Jul 2017 11:05:17 +0200 +Subject: [PATCH 201/201] 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 7434a6ddd94b121f6ffd9cf518d16b9fda5422b1..7d237499aeb2ebbbf95d96d1459f61f546935630 100644 +--- a/arch/arm/configs/bcm2709_defconfig ++++ b/arch/arm/configs/bcm2709_defconfig +@@ -898,6 +898,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_SOUND_PRIME=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index f13f9fb0a19424bebe5f3c662c92789ca41be509..dca568d6577cfa71280668e9d08232bff978dfc3 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -892,6 +892,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_SOUND_PRIME=m