diff --git a/projects/RPi/patches/linux/linux-01-RPi_support.patch b/projects/RPi/patches/linux/linux-01-RPi_support.patch index 2545f53985..d993b72a8f 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 5834d909e486f24d3c3aa597c29c3e578c0f8a33 Mon Sep 17 00:00:00 2001 +From 6f2945c416d064f907d389db060728b5c5192009 Mon Sep 17 00:00:00 2001 From: Dan Pasanen Date: Thu, 21 Sep 2017 09:55:42 -0500 -Subject: [PATCH 001/170] arm: partially revert +Subject: [PATCH 001/150] arm: partially revert 702b94bff3c50542a6e4ab9a4f4cef093262fe65 * Re-expose some dmi APIs for use in VCSM @@ -106,10 +106,10 @@ index 054b491ff7649ca067ff821770aec80a4da42102..70e8b7d3443467ae9595924f1a9d043b EXPORT_SYMBOL(cpu_cache); #endif -From 6e1197148c93847acec237d0f811f32cdc0d4380 Mon Sep 17 00:00:00 2001 +From 81dd799c6c9cb6996912b7be73d8e5da7799627e Mon Sep 17 00:00:00 2001 From: Steve Glendinning Date: Thu, 19 Feb 2015 18:47:12 +0000 -Subject: [PATCH 002/170] smsx95xx: fix crimes against truesize +Subject: [PATCH 002/150] 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. @@ -156,10 +156,10 @@ index 309b88acd3d0b6ca1528dde7b27a23926f9be952..25e37195ceb00cfc0ced7638e8b571a1 usbnet_skb_return(dev, ax_skb); } -From b99c187a4ba0e40f36f2877b2fce4030a3f7088e Mon Sep 17 00:00:00 2001 +From f9aa0d3f902124ab8ae0021d81d81883ce979c34 Mon Sep 17 00:00:00 2001 From: Sam Nazarko Date: Fri, 1 Apr 2016 17:27:21 +0100 -Subject: [PATCH 003/170] smsc95xx: Experimental: Enable turbo_mode and +Subject: [PATCH 003/150] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560 by default See: http://forum.kodi.tv/showthread.php?tid=285288 @@ -202,10 +202,10 @@ index 25e37195ceb00cfc0ced7638e8b571a1b0b8e6f1..09c7d4a07299e70b1cdc9df2c2c4cb39 netif_dbg(dev, ifup, dev->net, "rx_urb_size=%ld\n", -From 0e388ef4cc98d3dee5d1f8d58d5675d62fddc182 Mon Sep 17 00:00:00 2001 +From 2c548180a363d9696963b78707e93bae61c3dcbc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 004/170] Allow mac address to be set in smsc95xx +Subject: [PATCH 004/150] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -301,10 +301,10 @@ index 09c7d4a07299e70b1cdc9df2c2c4cb39d2207c37..4d9704d0b184df9bd7ddbe6769e40a75 eth_hw_addr_random(dev->net); netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); -From f5367d89fb84617615ede32c816153175d48b346 Mon Sep 17 00:00:00 2001 +From e798a1b40a2488df35575f002a119b08d123d030 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 13 Mar 2015 12:43:36 +0000 -Subject: [PATCH 005/170] Protect __release_resource against resources without +Subject: [PATCH 005/150] Protect __release_resource against resources without parents Without this patch, removing a device tree overlay can crash here. @@ -332,10 +332,10 @@ index 9b5f04404152c296af3a96132f27cfc80ffa9af9..f8a9af6e6b915812be2ba2c1c2b40106 for (;;) { tmp = *p; -From 7318831c1e53b52cb2df226fcf0d9d0d7ffdf464 Mon Sep 17 00:00:00 2001 +From 86126929ba2c5ef3b66341ccf70dc80cafe69b38 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 4 Dec 2015 17:41:50 +0000 -Subject: [PATCH 006/170] irq-bcm2836: Prevent spurious interrupts, and trap +Subject: [PATCH 006/150] irq-bcm2836: Prevent spurious interrupts, and trap them early The old arch-specific IRQ macros included a dsb to ensure the @@ -362,10 +362,10 @@ index dc8c1e3eafe794a3af83dd987a6d6362d14dd5ee..e8204d9af58f1b893505c06902a83390 #endif } else if (stat) { -From 95171a84fa9830e99d61cad2277853ef853cc2bb Mon Sep 17 00:00:00 2001 +From efed369bf7ab606d356301abc1a56b2dcc36a978 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:33:30 +0000 -Subject: [PATCH 007/170] irq-bcm2836: Avoid "Invalid trigger warning" +Subject: [PATCH 007/150] irq-bcm2836: Avoid "Invalid trigger warning" Initialise the level for each IRQ to avoid a warning from the arm arch timer code. @@ -389,10 +389,10 @@ index e8204d9af58f1b893505c06902a83390c2ea8509..6e3fab9587b782e026c01fa6b6e40338 static void -From b456ba97467440bc8355de332931f82674af6f5a Mon Sep 17 00:00:00 2001 +From 8b94e690dff0df396d618ea14ddd3664b5b9badc 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/170] irqchip: bcm2835: Add FIQ support +Subject: [PATCH 008/150] irqchip: bcm2835: Add FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -521,10 +521,10 @@ index d2da8a1e6b1b71381e382d034e7a94e865a6c3da..c4903360eabc2bef04f8e745782cea26 } -From 00f567a5bbbe36f93fdf5424ae8f2b9fa8745bf4 Mon Sep 17 00:00:00 2001 +From 672802dc2b18404f57ec3aa7c849e784133f9fe8 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/170] irqchip: irq-bcm2835: Add 2836 FIQ support +Subject: [PATCH 009/150] irqchip: irq-bcm2835: Add 2836 FIQ support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -623,10 +623,10 @@ index c4903360eabc2bef04f8e745782cea268fb22897..13356d3b7bcd508f058c6a9e3c4b0b38 for (b = 0; b < NR_BANKS; b++) { for (i = 0; i < bank_irqs[b]; i++) { -From 69e483dc2d632de2110aed81288f4959e7d42c64 Mon Sep 17 00:00:00 2001 +From 730ef7bef046ba3701dc2b10a547bf50ea6c97fd Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 8 May 2017 16:43:40 +0100 -Subject: [PATCH 010/170] irq_bcm2836: Send event when onlining sleeping cores +Subject: [PATCH 010/150] 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 @@ -662,10 +662,10 @@ index 6e3fab9587b782e026c01fa6b6e40338ef0c8d0a..86b357ae027bf8ba1ac32cd150a8cf21 } -From 6575f107853cd949d464b074982b5c2867d7b0d5 Mon Sep 17 00:00:00 2001 +From 8486e58fc672b75dc3f2c126f325ab4527d8bf6f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 10:26:09 +0100 -Subject: [PATCH 011/170] spidev: Add "spidev" compatible string to silence +Subject: [PATCH 011/150] spidev: Add "spidev" compatible string to silence warning See: https://github.com/raspberrypi/linux/issues/1054 @@ -686,10 +686,10 @@ index cda10719d1d1b21b32866d2b79363faa461ab8e1..4f3779d3aa0960640506725bde918075 }; MODULE_DEVICE_TABLE(of, spidev_dt_ids); -From 6543b7e17b32c0872960349c75ec472823b4b051 Mon Sep 17 00:00:00 2001 +From a3dca7253188dc2979a3d330f34c3abfe1de320f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Jun 2015 14:10:44 +0100 -Subject: [PATCH 012/170] spi-bcm2835: Support pin groups other than 7-11 +Subject: [PATCH 012/150] 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 @@ -770,10 +770,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 0cf73373e1d8a1487f7d47f25e98d9bc31456d25 Mon Sep 17 00:00:00 2001 +From 5eca0c6ca5b60c14c82290fdfefe62efb3ef3ba2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 1 Jul 2016 22:09:24 +0100 -Subject: [PATCH 013/170] spi-bcm2835: Disable forced software CS +Subject: [PATCH 013/150] 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 @@ -807,10 +807,10 @@ index 5dfe20ffc2866fa6789825016c585175a29705b6..8493474d286f7a1ac6454a22c61c8c2c return 0; } -From 1c55992f49647178ccf90aa4e0c4efe6b410ce2c Mon Sep 17 00:00:00 2001 +From 8768e60197263066353fe5192ec8c93e9608c9aa Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 8 Nov 2016 21:35:38 +0000 -Subject: [PATCH 014/170] spi-bcm2835: Remove unused code +Subject: [PATCH 014/150] spi-bcm2835: Remove unused code --- drivers/spi/spi-bcm2835.c | 61 ----------------------------------------------- @@ -898,10 +898,10 @@ index 8493474d286f7a1ac6454a22c61c8c2cef9121bf..33d75ad38a7f77d085321ace9101900a } -From 1cf460f8d67487b9d96a009f30ee7547e75a576d Mon Sep 17 00:00:00 2001 +From 466148b5153f8f693d23b140e4e58e38be0df322 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 015/170] ARM: bcm2835: Set Serial number and Revision +Subject: [PATCH 015/150] ARM: bcm2835: Set Serial number and Revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -954,10 +954,10 @@ index 0c1edfc98696da0e0bb7f4a18cdfbcdd27a9795d..8f152266ba9b470df2eaaed9ebcf158e static const char * const bcm2835_compat[] = { -From 2eb321d6312c559446a45e83734dcee398fa152e Mon Sep 17 00:00:00 2001 +From 678f7d42376022e050a14558b2e1cb735e3bc4b9 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 016/170] dmaengine: bcm2835: Load driver early and support +Subject: [PATCH 016/150] dmaengine: bcm2835: Load driver early and support legacy API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -1060,20 +1060,29 @@ index 6204cc32d09c5096df8aec304c3c37b3bcb6be44..599c218dc8a73172dd4bd4a058fc8f95 MODULE_ALIAS("platform:bcm2835-dma"); MODULE_DESCRIPTION("BCM2835 DMA engine driver"); -From 24c57ec656eede086c494fde0b9754314edd72b5 Mon Sep 17 00:00:00 2001 +From c1014845fbcff5f684b4aaca4015908200f1a361 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 25 Jan 2016 17:25:12 +0000 -Subject: [PATCH 017/170] firmware: Updated mailbox header +Subject: [PATCH 017/150] firmware: Updated mailbox header --- - include/soc/bcm2835/raspberrypi-firmware.h | 9 +++++++++ - 1 file changed, 9 insertions(+) + include/soc/bcm2835/raspberrypi-firmware.h | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca3bfff33f 100644 +index cb979ad90401e299344dd5fae38d09c489d8bd58..cbd1674570433fc591df89f68c892b338a159e82 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h -@@ -63,6 +63,7 @@ enum rpi_firmware_property_tag { +@@ -12,6 +12,8 @@ + #include + #include + ++#define RPI_FIRMWARE_CHAN_FB 1 ++ + struct rpi_firmware; + + enum rpi_firmware_property_status { +@@ -63,6 +65,7 @@ enum rpi_firmware_property_tag { RPI_FIRMWARE_GET_MIN_VOLTAGE = 0x00030008, RPI_FIRMWARE_GET_TURBO = 0x00030009, RPI_FIRMWARE_GET_MAX_TEMPERATURE = 0x0003000a, @@ -1081,7 +1090,7 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_ALLOCATE_MEMORY = 0x0003000c, RPI_FIRMWARE_LOCK_MEMORY = 0x0003000d, RPI_FIRMWARE_UNLOCK_MEMORY = 0x0003000e, -@@ -72,12 +73,15 @@ enum rpi_firmware_property_tag { +@@ -72,12 +75,22 @@ enum rpi_firmware_property_tag { RPI_FIRMWARE_SET_ENABLE_QPU = 0x00030012, RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014, RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020, @@ -1093,11 +1102,18 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_SET_TURBO = 0x00038009, + RPI_FIRMWARE_SET_CUSTOMER_OTP = 0x00038021, RPI_FIRMWARE_SET_DOMAIN_STATE = 0x00038030, ++ RPI_FIRMWARE_GET_GPIO_STATE = 0x00030041, ++ RPI_FIRMWARE_SET_GPIO_STATE = 0x00038041, + RPI_FIRMWARE_SET_SDHOST_CLOCK = 0x00038042, ++ RPI_FIRMWARE_GET_GPIO_CONFIG = 0x00030043, ++ RPI_FIRMWARE_SET_GPIO_CONFIG = 0x00038043, ++ RPI_FIRMWARE_GET_PERIPH_REG = 0x00030045, ++ RPI_FIRMWARE_SET_PERIPH_REG = 0x00038045, ++ /* Dispmanx TAGS */ RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -@@ -91,6 +95,8 @@ enum rpi_firmware_property_tag { +@@ -91,6 +104,8 @@ enum rpi_firmware_property_tag { RPI_FIRMWARE_FRAMEBUFFER_GET_VIRTUAL_OFFSET = 0x00040009, RPI_FIRMWARE_FRAMEBUFFER_GET_OVERSCAN = 0x0004000a, RPI_FIRMWARE_FRAMEBUFFER_GET_PALETTE = 0x0004000b, @@ -1106,7 +1122,7 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_FRAMEBUFFER_RELEASE = 0x00048001, RPI_FIRMWARE_FRAMEBUFFER_TEST_PHYSICAL_WIDTH_HEIGHT = 0x00044003, RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_WIDTH_HEIGHT = 0x00044004, -@@ -100,6 +106,7 @@ enum rpi_firmware_property_tag { +@@ -100,6 +115,7 @@ enum rpi_firmware_property_tag { RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_OFFSET = 0x00044009, RPI_FIRMWARE_FRAMEBUFFER_TEST_OVERSCAN = 0x0004400a, RPI_FIRMWARE_FRAMEBUFFER_TEST_PALETTE = 0x0004400b, @@ -1114,20 +1130,29 @@ index cb979ad90401e299344dd5fae38d09c489d8bd58..30fb37fe175df604a738258a2a632bca RPI_FIRMWARE_FRAMEBUFFER_SET_PHYSICAL_WIDTH_HEIGHT = 0x00048003, RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_WIDTH_HEIGHT = 0x00048004, RPI_FIRMWARE_FRAMEBUFFER_SET_DEPTH = 0x00048005, -@@ -108,6 +115,8 @@ enum rpi_firmware_property_tag { +@@ -108,6 +124,10 @@ enum rpi_firmware_property_tag { RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_OFFSET = 0x00048009, RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN = 0x0004800a, RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE = 0x0004800b, ++ RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF = 0x0004801f, ++ RPI_FIRMWARE_FRAMEBUFFER_SET_GPIOVIRTBUF = 0x00048020, + RPI_FIRMWARE_FRAMEBUFFER_SET_VSYNC = 0x0004800e, + RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, RPI_FIRMWARE_VCHIQ_INIT = 0x00048010, +@@ -139,5 +159,6 @@ static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware + return NULL; + } + #endif ++int rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data); + + #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From ea059564761ce8f5dbb28bd2bed5559a9003904d Mon Sep 17 00:00:00 2001 +From 6e87c497d13d1b285c9e3989105217bead4dd7ed Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 15 Jun 2016 16:48:41 +0100 -Subject: [PATCH 018/170] rtc: Add SPI alias for pcf2123 driver +Subject: [PATCH 018/150] rtc: Add SPI alias for pcf2123 driver Without this alias, Device Tree won't cause the driver to be loaded. @@ -1147,10 +1172,10 @@ index 8895f77726e8da5444afcd602dceff8f25a9b3fd..1833b8853ceb0e6147cceb93a00e558c MODULE_LICENSE("GPL"); +MODULE_ALIAS("spi:rtc-pcf2123"); -From c7fe1fb54a10a8d43d1211153b3604d8e65e6511 Mon Sep 17 00:00:00 2001 +From ce56c212277e28c48118228720c9d36498395bd5 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 019/170] watchdog: bcm2835: Support setting reboot partition +Subject: [PATCH 019/150] watchdog: bcm2835: Support setting reboot partition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -1252,10 +1277,10 @@ index b339e0e67b4c1275fd4992fea4f1e24c0575b783..26b7177573fac2af1cd4ab5488d2686f static int bcm2835_wdt_probe(struct platform_device *pdev) -From cfa23be8d08b028bef445827189360e8489de954 Mon Sep 17 00:00:00 2001 +From 7df6349cce828fa5c1dac9b0aa65e2a1fb7d61d4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 5 Apr 2016 19:40:12 +0100 -Subject: [PATCH 020/170] reboot: Use power off rather than busy spinning when +Subject: [PATCH 020/150] reboot: Use power off rather than busy spinning when halt is requested --- @@ -1278,10 +1303,10 @@ index 3b2aa9a9fe268d45335f781c4aa22cf573753a1b..0180d89a34af45c56243fe0f17fbe209 /* -From 4eb0977b2823db0d9b3870954fa207ab455f0e40 Mon Sep 17 00:00:00 2001 +From afe2fbc9da6a4a54b186bb4bac28f4abc6243d7c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 9 Nov 2016 13:02:52 +0000 -Subject: [PATCH 021/170] bcm: Make RASPBERRYPI_POWER depend on PM +Subject: [PATCH 021/150] bcm: Make RASPBERRYPI_POWER depend on PM --- drivers/soc/bcm/Kconfig | 1 + @@ -1300,10 +1325,10 @@ index 49f1e2a75d614bc21db152327c7b425ae2504f8d..dccd2374ed00631abd441e3e9d78ee74 help This enables support for the RPi power domains which can be enabled -From f8957712a61a4b8fc58c9820c15ed40eda9fd380 Mon Sep 17 00:00:00 2001 +From 1559dc55b9be8e313b08897078f6359f071a8a7c Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 2 Sep 2016 16:45:27 +0100 -Subject: [PATCH 022/170] Register the clocks early during the boot process, so +Subject: [PATCH 022/150] 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. @@ -1348,10 +1373,10 @@ index 58ce6af8452db9ca8b4d3c380a06e448919f6a8d..11d89d106026f15719ea25047d6f357b MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("BCM2835 clock driver"); -From bf3733179a93903a925d6d90a3be4d15c163982c Mon Sep 17 00:00:00 2001 +From 86e2d53024e5ff00f6cf9f2fb4b47d8c7d0fbb1d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 6 Dec 2016 17:05:39 +0000 -Subject: [PATCH 023/170] bcm2835-rng: Avoid initialising if already enabled +Subject: [PATCH 023/150] bcm2835-rng: Avoid initialising if already enabled Avoids the 0x40000 cycles of warmup again if firmware has already used it --- @@ -1377,10 +1402,10 @@ index 574211a495491d9d6021dcaefe4274a63ed02055..e66c0fca8c6090e32f72796c0877a1cf err = hwrng_register(&bcm2835_rng_ops); if (err) { -From 63ac19b5bbb224eafd914383cf09e44566af68e7 Mon Sep 17 00:00:00 2001 +From a69045939a89f6abeddbb2d78c18d950ad714714 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 24 Aug 2016 16:28:44 +0100 -Subject: [PATCH 024/170] kbuild: Ignore dtco targets when filtering symbols +Subject: [PATCH 024/150] kbuild: Ignore dtco targets when filtering symbols --- scripts/Kbuild.include | 2 +- @@ -1400,10 +1425,10 @@ index 9ffd3dda3889c56a7a72229bed21ff5c49d62856..00da6c9bacbf33334233e22ca5209ade esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' -From a297e9f540eef788e8ceca2b5bf39c4525b00f8f Mon Sep 17 00:00:00 2001 +From e272265844f9e4969ae89b5c001e61cae562e4e7 Mon Sep 17 00:00:00 2001 From: Robert Tiemann Date: Mon, 20 Jul 2015 11:01:25 +0200 -Subject: [PATCH 025/170] BCM2835_DT: Fix I2S register map +Subject: [PATCH 025/150] BCM2835_DT: Fix I2S register map --- Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt | 4 ++-- @@ -1441,10 +1466,10 @@ index 65783de0aedf3da79adc36fd077b7a89954ddb6b..a89fe4220fdc3f26f75ee66daf187554 dmas = <&dma 2>, <&dma 3>; -From 79f790ef9862a4471a52c4ec7cbb6f9e95da077b Mon Sep 17 00:00:00 2001 +From 07419d735960d6be6fcc0fa067a54169c765f808 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 026/170] clk-bcm2835: Mark used PLLs and dividers CRITICAL +Subject: [PATCH 026/150] 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 @@ -1472,10 +1497,10 @@ index 11d89d106026f15719ea25047d6f357b4bfcb2c5..fe8f5d65f2749cb3ddc878df61664826 divider->data = data; -From 111bc961c2184833d24df43e232bd63344dc394f Mon Sep 17 00:00:00 2001 +From d7e0434297b0330f0b7e81c0f877e4a30e5915a3 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 13 Feb 2017 17:20:08 +0000 -Subject: [PATCH 027/170] clk-bcm2835: Add claim-clocks property +Subject: [PATCH 027/150] 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, @@ -1577,10 +1602,10 @@ index fe8f5d65f2749cb3ddc878df616648267441e0ee..92b5e0f5145b32d3bfc3592fe381e8be sizeof(cprman_parent_names)); of_clk_parent_fill(dev->of_node, cprman->real_parent_names, -From ecba14966e3934898cb90f672cadc882b791c173 Mon Sep 17 00:00:00 2001 +From d1e38465fccff99695fed6564180abe9c3739ac1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 6 Mar 2017 09:06:18 +0000 -Subject: [PATCH 028/170] clk-bcm2835: Read max core clock from firmware +Subject: [PATCH 028/150] 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 @@ -1695,10 +1720,10 @@ index 92b5e0f5145b32d3bfc3592fe381e8be3cd90c72..336f8c9c44325d0a94e591a8557f7af2 for (i = 0; !of_property_read_u32_index(pdev->dev.of_node, "claim-clocks", -From 69914f4a9d92b3a83588043f40adfd9b65aa8d21 Mon Sep 17 00:00:00 2001 +From 5b01710cb8dfa475b801da5667d3e545c3b9eabd Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 9 May 2016 17:28:18 -0700 -Subject: [PATCH 029/170] clk: bcm2835: Mark GPIO clocks enabled at boot as +Subject: [PATCH 029/150] clk: bcm2835: Mark GPIO clocks enabled at boot as critical. These divide off of PLLD_PER and are used for the ethernet and wifi @@ -1736,10 +1761,10 @@ index 336f8c9c44325d0a94e591a8557f7af246adc857..caa05e5ad0b7b5cd683e04fb3591a3df * Pass the CLK_SET_RATE_PARENT flag if we are allowed to propagate * rate changes on at least of the parents. -From e5d220a91d65247e6d1c363ae7e52a69da73b089 Mon Sep 17 00:00:00 2001 +From 7e5626a8c0fe6381939ce7ce295d00db17506e8e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 9 Feb 2017 14:36:44 +0000 -Subject: [PATCH 030/170] sound: Demote deferral errors to INFO level +Subject: [PATCH 030/150] 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. @@ -1774,10 +1799,10 @@ index fee4b0ef5566cf9e8de0bf5c568706da9cab2ea2..c728a4148903e983d61b6ae65765ba11 goto _err_defer; } -From 7463bd9934217afb70e2cca93553b6ab9c74ebf4 Mon Sep 17 00:00:00 2001 +From c31974df585f99143f3315fae41277101fde6eec Mon Sep 17 00:00:00 2001 From: Claggy3 Date: Sat, 11 Feb 2017 14:00:30 +0000 -Subject: [PATCH 031/170] Update vfpmodule.c +Subject: [PATCH 031/150] 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 @@ -1914,10 +1939,10 @@ index a71a48e71fffa8626fe90106815376c44bbe679b..d6c0a5a0a5ae3510db3ace5e3f5d3410 /* * Save the userland NEON/VFP state. Under UP, -From 362ad867aa8d083604fef610f336fc28bef6d629 Mon Sep 17 00:00:00 2001 +From 5027f5a3257d195f37bcc2d37f47ad13674887cf Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 21:13:24 +1100 -Subject: [PATCH 032/170] ASoC: bcm2835_i2s.c: relax the ch2 register setting +Subject: [PATCH 032/150] 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. @@ -1938,10 +1963,10 @@ index 6ba20498202ed36906b52096893a88867a79269f..56df7d8a43d0aac055a91b0d24aca8e1 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); -From 6a684f77af5814e8bb11d37caad1237854ffa959 Mon Sep 17 00:00:00 2001 +From 3c0f304e892dc4b25ecac71838db719c6cf753b4 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 033/170] i2c: bcm2835: Add debug support +Subject: [PATCH 033/150] i2c: bcm2835: Add debug support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2130,10 +2155,10 @@ index cd07a69e2e9355540442785f95e90823b05c9d10..47167f403cc8329bd811b47c7011c299 if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO; -From 990bd2457b26ec500507cb8c3a57e9d54caf142a Mon Sep 17 00:00:00 2001 +From f6af6c3f1d80e1c90c7b5300a48cf9375bbcdddb Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Dec 2014 16:07:15 -0800 -Subject: [PATCH 034/170] mm: Remove the PFN busy warning +Subject: [PATCH 034/150] mm: Remove the PFN busy warning See commit dae803e165a11bc88ca8dbc07a11077caf97bbcb -- the warning is expected sometimes when using CMA. However, that commit still spams @@ -2145,10 +2170,10 @@ Signed-off-by: Eric Anholt 1 file changed, 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 82a6270c9743c9da4dd0d3a6d97f93923ea63bd8..13b6b0d931d08e05cef0cf789ceaf54601e64d89 100644 +index d51c2087c498c63f3f515d2931e42b5110efb62f..fd094c36e26c712d7537b16aa547d3e8e1d4bf33 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7642,8 +7642,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, +@@ -7645,8 +7645,6 @@ int alloc_contig_range(unsigned long start, unsigned long end, /* Make sure the range is really isolated. */ if (test_pages_isolated(outer_start, end, false)) { @@ -2158,10 +2183,10 @@ index 82a6270c9743c9da4dd0d3a6d97f93923ea63bd8..13b6b0d931d08e05cef0cf789ceaf546 goto done; } -From ac7bc99a33ff249f41c4688c88e5a43e53bde75a Mon Sep 17 00:00:00 2001 +From 7f02844d849b8ef0a237818b8e53ab1d6bcfc284 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 10:06:56 +0000 -Subject: [PATCH 035/170] ASoC: Add prompt for ICS43432 codec +Subject: [PATCH 035/150] 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 @@ -2186,10 +2211,10 @@ index c367d11079bc90feec2ad0fa748d7ffc3035faba..91d5b531b69b49db97f7febbc60d33a2 config SND_SOC_INNO_RK3036 tristate "Inno codec driver for RK3036 SoC" -From 958130437459809ae5bb896638561410506590c6 Mon Sep 17 00:00:00 2001 +From 32db47fcf84f7eebaacf50da29680ac48dc71b0a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 036/170] Main bcm2708/bcm2709 linux port +Subject: [PATCH 036/150] Main bcm2708/bcm2709 linux port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2377,10 +2402,10 @@ index cfb4b4496dd9f61362dea012176c146120fada07..d9c6c217c4d6a2408abe2665bf7f2700 MODULE_AUTHOR("Lubomir Rintel "); MODULE_DESCRIPTION("BCM2835 mailbox IPC driver"); -From 5702dd11621cfcd58114878a8084f717fca7ba26 Mon Sep 17 00:00:00 2001 +From 8ba530eaad77b1d026d3e1b17fc57964047d4ee1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 037/170] Add dwc_otg driver +Subject: [PATCH 037/150] Add dwc_otg driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2997,6 +3022,34 @@ Constrain queuing non-periodic split transactions so they are performed serially in such cases. Related: https://github.com/raspberrypi/linux/issues/2024 + +dwc_otg: Fixup change to DRIVER_ATTR interface + +dwc_otg: Fix compilation warnings + +Signed-off-by: Phil Elwell + +USB_DWCOTG: Disable building dwc_otg as a module (#2265) + +When dwc_otg is built as a module, build will fail with the following +error: + +ERROR: "DWC_TASK_HI_SCHEDULE" [drivers/usb/host/dwc_otg/dwc_otg.ko] undefined! +scripts/Makefile.modpost:91: recipe for target '__modpost' failed +make[1]: *** [__modpost] Error 1 +Makefile:1199: recipe for target 'modules' failed +make: *** [modules] Error 2 + +Even if the error is solved by including the missing +DWC_TASK_HI_SCHEDULE function, the kernel will panic when loading +dwc_otg. + +As a workaround, simply prevent user from building dwc_otg as a module +as the current kernel does not support it. + +See: https://github.com/raspberrypi/linux/issues/2258 + +Signed-off-by: Malik Olivier Boussejra --- arch/arm/include/asm/irqflags.h | 16 +- arch/arm/kernel/fiqasm.S | 4 + @@ -3006,7 +3059,7 @@ Related: https://github.com/raspberrypi/linux/issues/2024 drivers/usb/core/message.c | 79 + drivers/usb/core/otg_whitelist.h | 114 +- drivers/usb/gadget/file_storage.c | 3676 ++++++++++ - drivers/usb/host/Kconfig | 13 + + drivers/usb/host/Kconfig | 10 + drivers/usb/host/Makefile | 2 + drivers/usb/host/dwc_common_port/Makefile | 58 + drivers/usb/host/dwc_common_port/Makefile.fbsd | 17 + @@ -3036,7 +3089,7 @@ Related: https://github.com/raspberrypi/linux/issues/2024 drivers/usb/host/dwc_otg/dwc_cfi_common.h | 142 + drivers/usb/host/dwc_otg/dwc_otg_adp.c | 854 +++ drivers/usb/host/dwc_otg/dwc_otg_adp.h | 80 + - drivers/usb/host/dwc_otg/dwc_otg_attr.c | 1210 ++++ + drivers/usb/host/dwc_otg/dwc_otg_attr.c | 1212 ++++ drivers/usb/host/dwc_otg/dwc_otg_attr.h | 89 + drivers/usb/host/dwc_otg/dwc_otg_cfi.c | 1876 +++++ drivers/usb/host/dwc_otg/dwc_otg_cfi.h | 320 + @@ -3045,16 +3098,16 @@ Related: https://github.com/raspberrypi/linux/issues/2024 drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c | 1596 +++++ drivers/usb/host/dwc_otg/dwc_otg_core_if.h | 705 ++ drivers/usb/host/dwc_otg/dwc_otg_dbg.h | 117 + - drivers/usb/host/dwc_otg/dwc_otg_driver.c | 1761 +++++ + drivers/usb/host/dwc_otg/dwc_otg_driver.c | 1760 +++++ drivers/usb/host/dwc_otg/dwc_otg_driver.h | 86 + drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.c | 1389 ++++ drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 372 + drivers/usb/host/dwc_otg/dwc_otg_fiq_stub.S | 80 + - drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 4284 ++++++++++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 4283 ++++++++++++ drivers/usb/host/dwc_otg/dwc_otg_hcd.h | 870 +++ drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c | 1134 ++++ drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h | 417 ++ - drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2753 ++++++++ + drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2752 ++++++++ drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 1007 +++ drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 971 +++ drivers/usb/host/dwc_otg/dwc_otg_os_dep.h | 188 + @@ -3068,7 +3121,7 @@ Related: https://github.com/raspberrypi/linux/issues/2024 drivers/usb/host/dwc_otg/test/dwc_otg_test.pm | 337 + drivers/usb/host/dwc_otg/test/test_mod_param.pl | 133 + drivers/usb/host/dwc_otg/test/test_sysfs.pl | 193 + - 70 files changed, 60007 insertions(+), 16 deletions(-) + 70 files changed, 60003 insertions(+), 16 deletions(-) create mode 100644 drivers/usb/gadget/file_storage.c create mode 100644 drivers/usb/host/dwc_common_port/Makefile create mode 100644 drivers/usb/host/dwc_common_port/Makefile.fbsd @@ -7141,15 +7194,15 @@ index 0000000000000000000000000000000000000000..a896d73f7a9336f5a34015c44ea5a6b0 +} +module_exit(fsg_cleanup); diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index fa5692dec8320695a59bf7f3c0fa0a9e5457a0de..64ed87af62b3d38db663cc77978b024d0f020f65 100644 +index fa5692dec8320695a59bf7f3c0fa0a9e5457a0de..9eeb88a5b6e6b4e728d18abf6175ef19986c6bdc 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig -@@ -771,6 +771,19 @@ config USB_HWA_HCD +@@ -771,6 +771,16 @@ config USB_HWA_HCD To compile this driver a module, choose M here: the module will be called "hwa-hc". +config USB_DWCOTG -+ tristate "Synopsis DWC host support" ++ bool "Synopsis DWC host support" + depends on USB && (FIQ || ARM64) + help + The Synopsis DWC controller is a dual-role @@ -7157,9 +7210,6 @@ index fa5692dec8320695a59bf7f3c0fa0a9e5457a0de..64ed87af62b3d38db663cc77978b024d + + Enable this option to support this IP in host controller mode. + If unsure, say N. -+ -+ To compile this driver as a module, choose M here: the -+ modules built will be called dwc_otg and dwc_common_port. + config USB_IMX21_HCD tristate "i.MX21 HCD support" @@ -20616,10 +20666,10 @@ index 0000000000000000000000000000000000000000..4110b25d2002ed64a760cf41bbf81c90 +#endif //__DWC_OTG_ADP_H__ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c new file mode 100644 -index 0000000000000000000000000000000000000000..9da0c92aaeca2fc393016442cc6578cb4a52c978 +index 0000000000000000000000000000000000000000..2f8ea77c3892b678cfacb61c70b95eebdbc553ac --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c -@@ -0,0 +1,1210 @@ +@@ -0,0 +1,1212 @@ +/* ========================================================================== + * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_attr.c $ + * $Revision: #44 $ @@ -21540,9 +21590,11 @@ index 0000000000000000000000000000000000000000..9da0c92aaeca2fc393016442cc6578cb +static ssize_t spramdump_show(struct device *_dev, + struct device_attribute *attr, char *buf) +{ -+ dwc_otg_device_t *otg_dev = dwc_otg_drvdev(_dev); ++#if 0 ++ dwc_otg_device_t *otg_dev = dwc_otg_drvdev(_dev); + -+ //dwc_otg_dump_spram(otg_dev->core_if); ++ dwc_otg_dump_spram(otg_dev->core_if); ++#endif + + return sprintf(buf, "SPRAM Dump\n"); +} @@ -35188,10 +35240,10 @@ index 0000000000000000000000000000000000000000..ccc24e010e449cbda488050d901e9a39 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c new file mode 100644 -index 0000000000000000000000000000000000000000..95943e07528276b26b51ea2d57a1f433f280aaef +index 0000000000000000000000000000000000000000..af123d01f3ef9f99450c78efdf766ca35e15cbc9 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -0,0 +1,1761 @@ +@@ -0,0 +1,1760 @@ +/* ========================================================================== + * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_driver.c $ + * $Revision: #92 $ @@ -35453,7 +35505,7 @@ index 0000000000000000000000000000000000000000..95943e07528276b26b51ea2d57a1f433 + DWC_DRIVER_VERSION); +} + -+static DRIVER_ATTR(version, S_IRUGO, version_show, NULL); ++static DRIVER_ATTR_RO(version); + +/** + * Global Debug Level Mask. @@ -35463,7 +35515,7 @@ index 0000000000000000000000000000000000000000..95943e07528276b26b51ea2d57a1f433 +/** + * This function shows the driver Debug Level. + */ -+static ssize_t dbg_level_show(struct device_driver *drv, char *buf) ++static ssize_t debuglevel_show(struct device_driver *drv, char *buf) +{ + return sprintf(buf, "0x%0x\n", g_dbg_lvl); +} @@ -35471,15 +35523,14 @@ index 0000000000000000000000000000000000000000..95943e07528276b26b51ea2d57a1f433 +/** + * This function stores the driver Debug Level. + */ -+static ssize_t dbg_level_store(struct device_driver *drv, const char *buf, ++static ssize_t debuglevel_store(struct device_driver *drv, const char *buf, + size_t count) +{ + g_dbg_lvl = simple_strtoul(buf, NULL, 16); + return count; +} + -+static DRIVER_ATTR(debuglevel, S_IRUGO | S_IWUSR, dbg_level_show, -+ dbg_level_store); ++static DRIVER_ATTR_RW(debuglevel); + +/** + * This function is called during module intialization @@ -38906,10 +38957,10 @@ index 0000000000000000000000000000000000000000..ffa8d21bc61e893fee86ba04955587e7 +END(_dwc_otg_fiq_stub) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c new file mode 100644 -index 0000000000000000000000000000000000000000..60464acab588a1e189f39b268ffc25766c13dc85 +index 0000000000000000000000000000000000000000..aeda94c01c18de508a2fe43bb0beef4970d40964 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -0,0 +1,4284 @@ +@@ -0,0 +1,4283 @@ + +/* ========================================================================== + * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_hcd.c $ @@ -40913,7 +40964,6 @@ index 0000000000000000000000000000000000000000..60464acab588a1e189f39b268ffc2576 + dwc_list_link_t *qh_ptr; + dwc_otg_qh_t *qh; + int num_channels; -+ dwc_irqflags_t flags; + dwc_otg_transaction_type_e ret_val = DWC_OTG_TRANSACTION_NONE; + +#ifdef DEBUG_HOST_CHANNELS @@ -45635,10 +45685,10 @@ index 0000000000000000000000000000000000000000..fb57db09378f4ab95d57cb58aa570a91 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c new file mode 100644 -index 0000000000000000000000000000000000000000..ed855eb9c3b64d54e93c5aa7e06212e779400dfd +index 0000000000000000000000000000000000000000..082159b64b343f1da1660065da2d85ece79d9963 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -0,0 +1,2753 @@ +@@ -0,0 +1,2752 @@ +/* ========================================================================== + * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_hcd_intr.c $ + * $Revision: #89 $ @@ -46588,7 +46638,6 @@ index 0000000000000000000000000000000000000000..ed855eb9c3b64d54e93c5aa7e06212e7 +{ + dwc_otg_transaction_type_e tr_type; + int free_qtd; -+ dwc_irqflags_t flags; + + int hog_port = 0; + @@ -63653,10 +63702,10 @@ index 0000000000000000000000000000000000000000..cdc9963176e5a4a0d5250613b61e26c5 +test_main(); +0; -From c25cadc96426f14db9fc6f744731bd7f45a43988 Mon Sep 17 00:00:00 2001 +From 872850d2836f7138725b8b92cf92059e6fc1fa71 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 17:06:34 +0100 -Subject: [PATCH 038/170] bcm2708 framebuffer driver +Subject: [PATCH 038/150] bcm2708 framebuffer driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67115,10 +67164,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 e10994655b38fdd5803bbb9c16a91c59cfd91655 Mon Sep 17 00:00:00 2001 +From fd606c7e1e43996d54eb68367f1cb040b8c93be2 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 039/170] dmaengine: Add support for BCM2708 +Subject: [PATCH 039/150] dmaengine: Add support for BCM2708 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67749,10 +67798,10 @@ index 0000000000000000000000000000000000000000..c5bfff2765be4606077e6c8af73040ec + +#endif /* _PLAT_BCM2708_DMA_H */ -From 98d692c40ee4b28f9f187b2dbca10723508be014 Mon Sep 17 00:00:00 2001 +From 29e61056ab4db393ca9c04744187afbf052e25a0 Mon Sep 17 00:00:00 2001 From: gellert Date: Fri, 15 Aug 2014 16:35:06 +0100 -Subject: [PATCH 040/170] MMC: added alternative MMC driver +Subject: [PATCH 040/150] MMC: added alternative MMC driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -67847,10 +67896,10 @@ Signed-off-by: Phil Elwell create mode 100644 drivers/mmc/host/bcm2835-mmc.c diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c -index 2ad7b5c691569e37cd366425c62c6ae0514f3857..b089ec42ce70d9af48136a142691a2e3596e13d9 100644 +index ccb516f18d72e21991dd11d1ae462ae2b4dfe524..1e19d3c60113eba34fc2e98fdf1eb0ab2e2a5488 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c -@@ -126,6 +126,13 @@ static DEFINE_MUTEX(open_lock); +@@ -130,6 +130,13 @@ static DEFINE_MUTEX(open_lock); module_param(perdev_minors, int, 0444); MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device"); @@ -67864,7 +67913,7 @@ index 2ad7b5c691569e37cd366425c62c6ae0514f3857..b089ec42ce70d9af48136a142691a2e3 static inline int mmc_blk_part_switch(struct mmc_card *card, unsigned int part_type); -@@ -2434,6 +2441,7 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -2484,6 +2491,7 @@ static int mmc_blk_probe(struct mmc_card *card) { struct mmc_blk_data *md, *part_md; char cap_str[10]; @@ -67872,7 +67921,7 @@ index 2ad7b5c691569e37cd366425c62c6ae0514f3857..b089ec42ce70d9af48136a142691a2e3 /* * Check that the card supports the command class(es) we need. -@@ -2441,7 +2449,16 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -2491,7 +2499,16 @@ static int mmc_blk_probe(struct mmc_card *card) if (!(card->csd.cmdclass & CCC_BLOCK_READ)) return -ENODEV; @@ -67890,7 +67939,7 @@ index 2ad7b5c691569e37cd366425c62c6ae0514f3857..b089ec42ce70d9af48136a142691a2e3 md = mmc_blk_alloc(card); if (IS_ERR(md)) -@@ -2449,9 +2466,14 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -2499,9 +2516,14 @@ static int mmc_blk_probe(struct mmc_card *card) string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, cap_str, sizeof(cap_str)); @@ -69632,10 +69681,10 @@ index 279b39008a33bb68745d9ea55ea5dd7ed522fd1c..49bdea5791a289251019a89419804dde unsigned int erase_size; /* erase size in sectors */ -From c9294356857093749a78eae26e98ae0c28b2e9c9 Mon Sep 17 00:00:00 2001 +From 67761e736056d365817aad7a4a023ec2f7d555e6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Mar 2015 17:49:47 +0000 -Subject: [PATCH 041/170] Adding bcm2835-sdhost driver, and an overlay to +Subject: [PATCH 041/150] Adding bcm2835-sdhost driver, and an overlay to enable it BCM2835 has two SD card interfaces. This driver uses the other one. @@ -72041,10 +72090,10 @@ index 0000000000000000000000000000000000000000..9c6f199a7830959f31012d86bc1f8b1a +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Phil Elwell"); -From 4e62eda4c2bcb5192e3717b6814106cd5b66925f Mon Sep 17 00:00:00 2001 +From 63d4b77c65c02e0b2b787cd8be17801e1dfd6ea1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 28 Oct 2016 15:36:43 +0100 -Subject: [PATCH 042/170] vc_mem: Add vc_mem driver for querying firmware +Subject: [PATCH 042/150] vc_mem: Add vc_mem driver for querying firmware memory addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -72569,10 +72618,10 @@ index 0000000000000000000000000000000000000000..20a475377eb3078ea1ecaef2b24efc35 + +#endif /* _VC_MEM_H */ -From 55e97d940995fe9a76e24bfca410588d989cf633 Mon Sep 17 00:00:00 2001 +From 10d02e7028b532da989a2f5136c737e8da846504 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Tue, 22 Jul 2014 15:41:04 +0100 -Subject: [PATCH 043/170] vcsm: VideoCore shared memory service for BCM2835 +Subject: [PATCH 043/150] vcsm: VideoCore shared memory service for BCM2835 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -72647,7 +72696,7 @@ vcsm: Fix up macros to avoid breaking numbers used by existing apps --- drivers/char/Kconfig | 2 + drivers/char/Makefile | 1 + - drivers/char/broadcom/Kconfig | 9 + + drivers/char/broadcom/Kconfig | 10 + drivers/char/broadcom/Makefile | 1 + drivers/char/broadcom/vc_sm/Makefile | 9 + drivers/char/broadcom/vc_sm/vc_sm_defs.h | 237 ++ @@ -72656,7 +72705,7 @@ vcsm: Fix up macros to avoid breaking numbers used by existing apps drivers/char/broadcom/vc_sm/vc_vchi_sm.h | 102 + drivers/char/broadcom/vc_sm/vmcs_sm.c | 3493 ++++++++++++++++++++++++++++++ include/linux/broadcom/vmcs_sm_ioctl.h | 280 +++ - 11 files changed, 4708 insertions(+) + 11 files changed, 4709 insertions(+) create mode 100644 drivers/char/broadcom/vc_sm/Makefile create mode 100644 drivers/char/broadcom/vc_sm/vc_sm_defs.h create mode 100644 drivers/char/broadcom/vc_sm/vc_sm_knl.h @@ -72688,10 +72737,10 @@ index 7dc3abe664648eeec97b303d4c75488fadd04bf9..5c896839d6b247079ea70be8a8939edf obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o +obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/ diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index fc1315209dab9fbb1436ef1a6fafdc25917cf45a..09a43da7bcf85c3506c1b4f1b06369c3b6c2bbe6 100644 +index fc1315209dab9fbb1436ef1a6fafdc25917cf45a..2b6132d12b13d47c9535fded1b376db46760bf65 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig -@@ -16,3 +16,12 @@ config BCM2708_VCMEM +@@ -16,3 +16,13 @@ config BCM2708_VCMEM Helper for videocore memory access and total size allocation. endif @@ -72700,6 +72749,7 @@ index fc1315209dab9fbb1436ef1a6fafdc25917cf45a..09a43da7bcf85c3506c1b4f1b06369c3 + bool "VMCS Shared Memory" + depends on BCM2835_VCHIQ + select BCM2708_VCMEM ++ select DMA_SHARED_BUFFER + default n + help + Support for the VC shared memory on the Broadcom reference @@ -77449,10 +77499,10 @@ index 0000000000000000000000000000000000000000..b75729d762f25aace133f7a008633b40 + +#endif /* __VMCS_SM_IOCTL_H__INCLUDED__ */ -From af06a3692bb79ea0e04d9dc063b1a23436fe13db Mon Sep 17 00:00:00 2001 +From 4cace99d220bc57da87636b12a40cd92cf4b1b05 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Fri, 21 Aug 2015 23:14:48 +0100 -Subject: [PATCH 044/170] Add /dev/gpiomem device for rootless user GPIO access +Subject: [PATCH 044/150] Add /dev/gpiomem device for rootless user GPIO access Signed-off-by: Luke Wren @@ -77469,10 +77519,10 @@ See: https://github.com/raspberrypi/linux/issues/1154 create mode 100644 drivers/char/broadcom/bcm2835-gpiomem.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 09a43da7bcf85c3506c1b4f1b06369c3b6c2bbe6..ede8b5ca7aa1012507aa2006e89b5c47ea267351 100644 +index 2b6132d12b13d47c9535fded1b376db46760bf65..235704f2d916b6a77cb522b58b72b624d5befced 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig -@@ -25,3 +25,12 @@ config BCM_VC_SM +@@ -26,3 +26,12 @@ config BCM_VC_SM help Support for the VC shared memory on the Broadcom reference design. Uses the VCHIQ stack. @@ -77760,10 +77810,10 @@ index 0000000000000000000000000000000000000000..f5e7f1ba8fb6f18dee77fad06a17480c +MODULE_DESCRIPTION("gpiomem driver for accessing GPIO from userspace"); +MODULE_AUTHOR("Luke Wren "); -From 447a03e0c1eb35e879a58515c0d407af146cebab Mon Sep 17 00:00:00 2001 +From 9ebc192262ac457afdf23ebafaa1c6978c598ff7 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:14:45 +0100 -Subject: [PATCH 045/170] Add SMI driver +Subject: [PATCH 045/150] Add SMI driver Signed-off-by: Luke Wren --- @@ -77861,10 +77911,10 @@ index 0000000000000000000000000000000000000000..b76dc694f1ac0b8044000ae54d312c80 +}; + diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index ede8b5ca7aa1012507aa2006e89b5c47ea267351..87ea29bb65f98375e7326d9da74161fea5869514 100644 +index 235704f2d916b6a77cb522b58b72b624d5befced..4ef0d7af2bc72812b09c723e022468ba4607be0e 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig -@@ -34,3 +34,11 @@ config BCM2835_DEVGPIOMEM +@@ -35,3 +35,11 @@ config BCM2835_DEVGPIOMEM on the 2835. Calling mmap(/dev/gpiomem) will map the GPIO register page to the user's pointer. @@ -79714,10 +79764,10 @@ index 0000000000000000000000000000000000000000..ee3a75edfc033eeb0d90a687ffb68b10 + +#endif /* BCM2835_SMI_H */ -From 43051061aead578ca2c55bdf67db3457d39e33a2 Mon Sep 17 00:00:00 2001 +From 940e1644d707b301d9cb75349039f144e2e2aca6 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Tue, 26 Apr 2016 14:59:21 +0000 -Subject: [PATCH 046/170] MISC: bcm2835: smi: use clock manager and fix reload +Subject: [PATCH 046/150] MISC: bcm2835: smi: use clock manager and fix reload issues Use clock manager instead of self-made clockmanager. @@ -79886,10 +79936,10 @@ index 63a4ea08b9930a3a31a985f0a1d969b488ed49ec..1261540703127d1d63b9f3c87042c6e5 return 0; } -From 40d99ae5897115345c28edfee3d723f9af08f5c6 Mon Sep 17 00:00:00 2001 +From e1ea61ef1b44194d1f733f0ca9e5cda296d3bd48 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sat, 5 Sep 2015 01:16:10 +0100 -Subject: [PATCH 047/170] Add SMI NAND driver +Subject: [PATCH 047/150] Add SMI NAND driver Signed-off-by: Luke Wren --- @@ -80254,10 +80304,10 @@ index 0000000000000000000000000000000000000000..c4826ea1c2bae555ce780e61f1076ddd + ("Driver for NAND chips using Broadcom Secondary Memory Interface"); +MODULE_AUTHOR("Luke Wren "); -From 03f289e783464f25ed93215ebfc29e41357bd3f8 Mon Sep 17 00:00:00 2001 +From ebb9e3e9e9cdf636c1a796ba55ee2ab6b2fb4156 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 048/170] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 048/150] 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 @@ -81117,10 +81167,10 @@ index 0000000000000000000000000000000000000000..fb69624ccef00ddbdccf8256d6baf1b1 + +#endif -From cbb62e2fedf6a0213e9ea3864af69d10528ce375 Mon Sep 17 00:00:00 2001 +From 24bdb523756494d478cc8bed0698e017a3f76f05 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 049/170] Add cpufreq driver +Subject: [PATCH 049/150] Add cpufreq driver Signed-off-by: popcornmix @@ -81384,10 +81434,10 @@ index 0000000000000000000000000000000000000000..99345969b0e4d651fd9033d67de2febb +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); -From 4871b2c516e1b444e11ac764cf98899b0a613f8b Mon Sep 17 00:00:00 2001 +From 6cc62aa01af785d1727b22497a42a94aad415e97 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Jun 2015 15:44:08 +0100 -Subject: [PATCH 050/170] Add Chris Boot's i2c driver +Subject: [PATCH 050/150] Add Chris Boot's i2c driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82052,10 +82102,10 @@ index 0000000000000000000000000000000000000000..962f2e5c7455d91bf32925d785f5f16b +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -From 15cc5dd63e76ae2103d82e1e85b1771985be88ac Mon Sep 17 00:00:00 2001 +From bf72782e67afc065841d1cba7cc825616eb76e45 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 051/170] char: broadcom: Add vcio module +Subject: [PATCH 051/150] char: broadcom: Add vcio module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82072,7 +82122,7 @@ Signed-off-by: Noralf Trønnes create mode 100644 drivers/char/broadcom/vcio.c diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 87ea29bb65f98375e7326d9da74161fea5869514..014c7a15e85c6eff99f840fbc44fc6c83f2d9c91 100644 +index 4ef0d7af2bc72812b09c723e022468ba4607be0e..cffd17df6a1b62cc347331a9eaaf8f47fbbbb431 100644 --- a/drivers/char/broadcom/Kconfig +++ b/drivers/char/broadcom/Kconfig @@ -15,6 +15,12 @@ config BCM2708_VCMEM @@ -82280,10 +82330,10 @@ index 0000000000000000000000000000000000000000..c19bc2075c77879563ef5e59038b5a14 +MODULE_DESCRIPTION("Mailbox userspace access"); +MODULE_LICENSE("GPL"); -From 0941d7ab194be2d74a20b4b0726a7c0a7da64c8f Mon Sep 17 00:00:00 2001 +From d1bb99482eaf23c751c41b6f7ceabcf345e6af24 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 052/170] firmware: bcm2835: Support ARCH_BCM270x +Subject: [PATCH 052/150] firmware: bcm2835: Support ARCH_BCM270x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -82366,10 +82416,10 @@ index dd506cd3a5b874f9e1acd07efb8cd151bb6145d1..3f070bd38a91511c986e3fb114b15bd4 MODULE_AUTHOR("Eric Anholt "); MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -From d389691a4a46604bf7cef732cebf7fa59151d120 Mon Sep 17 00:00:00 2001 +From 2ad67a7989f7d7ea4bfcecc1f647b881c79243c1 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 11 May 2015 09:00:42 +0100 -Subject: [PATCH 053/170] scripts: Add mkknlimg and knlinfo scripts from tools +Subject: [PATCH 053/150] scripts: Add mkknlimg and knlinfo scripts from tools repo The Raspberry Pi firmware looks for a trailer on the kernel image to @@ -82896,10 +82946,10 @@ index 0000000000000000000000000000000000000000..84be2593ec1de8f97b0167ff06b3e05d + return $trailer; +} -From f5c5ff6a623102ff5c2bea50f2f2b2f6387e9a8f Mon Sep 17 00:00:00 2001 +From d5045ca293e4c956ea9a0d345f9d67cc6411a4ec Mon Sep 17 00:00:00 2001 From: notro Date: Wed, 9 Jul 2014 14:46:08 +0200 -Subject: [PATCH 054/170] BCM2708: Add core Device Tree support +Subject: [PATCH 054/150] BCM2708: Add core Device Tree support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -83099,7 +83149,7 @@ Signed-off-by: Phil Elwell arch/arm/Makefile | 2 + arch/arm/boot/.gitignore | 2 +- arch/arm/boot/dts/Makefile | 20 + - arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 162 ++ + arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 165 ++ arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 122 ++ arch/arm/boot/dts/bcm2708-rpi-b.dts | 112 ++ arch/arm/boot/dts/bcm2708-rpi-cm.dts | 95 ++ @@ -83108,13 +83158,12 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/bcm2708.dtsi | 20 + arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 122 ++ arch/arm/boot/dts/bcm2709.dtsi | 22 + - arch/arm/boot/dts/bcm270x.dtsi | 145 ++ - arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 191 +++ + arch/arm/boot/dts/bcm270x.dtsi | 181 +++ + arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 194 +++ arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 129 ++ - arch/arm/boot/dts/bcm2710.dtsi | 148 ++ - arch/arm/boot/dts/bcm283x.dtsi | 13 +- - arch/arm/boot/dts/overlays/Makefile | 125 ++ - arch/arm/boot/dts/overlays/README | 1620 ++++++++++++++++++++ + arch/arm/boot/dts/bcm2710.dtsi | 32 + + arch/arm/boot/dts/overlays/Makefile | 128 ++ + arch/arm/boot/dts/overlays/README | 1678 ++++++++++++++++++++ .../arm/boot/dts/overlays/adau1977-adc-overlay.dts | 40 + .../boot/dts/overlays/adau7002-simple-overlay.dts | 52 + arch/arm/boot/dts/overlays/ads1015-overlay.dts | 98 ++ @@ -83143,6 +83192,7 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/goodix-overlay.dts | 46 + .../overlays/googlevoicehat-soundcard-overlay.dts | 49 + arch/arm/boot/dts/overlays/gpio-ir-overlay.dts | 44 + + arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts | 34 + .../boot/dts/overlays/gpio-poweroff-overlay.dts | 34 + .../boot/dts/overlays/gpio-shutdown-overlay.dts | 80 + .../boot/dts/overlays/hifiberry-amp-overlay.dts | 39 + @@ -83157,8 +83207,8 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/i2c-mux-overlay.dts | 139 ++ .../boot/dts/overlays/i2c-pwm-pca9685a-overlay.dts | 26 + .../arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts | 183 +++ - arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 164 ++ - arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 142 ++ + arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 181 +++ + arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 206 +++ .../arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts | 61 + .../arm/boot/dts/overlays/i2c1-bcm2708-overlay.dts | 34 + .../boot/dts/overlays/i2s-gpio28-31-overlay.dts | 18 + @@ -83178,10 +83228,11 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/mmc-overlay.dts | 39 + arch/arm/boot/dts/overlays/mpu6050-overlay.dts | 28 + arch/arm/boot/dts/overlays/mz61581-overlay.dts | 117 ++ + arch/arm/boot/dts/overlays/papirus-overlay.dts | 89 ++ arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts | 27 + .../boot/dts/overlays/pi3-disable-bt-overlay.dts | 46 + .../boot/dts/overlays/pi3-disable-wifi-overlay.dts | 13 + - .../boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 64 + + .../boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 74 + arch/arm/boot/dts/overlays/piscreen-overlay.dts | 102 ++ arch/arm/boot/dts/overlays/piscreen2r-overlay.dts | 106 ++ arch/arm/boot/dts/overlays/pisound-overlay.dts | 120 ++ @@ -83191,6 +83242,7 @@ Signed-off-by: Phil Elwell .../dts/overlays/pitft35-resistive-overlay.dts | 121 ++ arch/arm/boot/dts/overlays/pps-gpio-overlay.dts | 35 + arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts | 47 + + arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts | 40 + arch/arm/boot/dts/overlays/pwm-overlay.dts | 43 + arch/arm/boot/dts/overlays/qca7000-overlay.dts | 52 + arch/arm/boot/dts/overlays/raspidac3-overlay.dts | 49 + @@ -83199,7 +83251,7 @@ Signed-off-by: Phil Elwell .../dts/overlays/rpi-cirrus-wm5102-overlay.dts | 146 ++ arch/arm/boot/dts/overlays/rpi-dac-overlay.dts | 34 + arch/arm/boot/dts/overlays/rpi-display-overlay.dts | 89 ++ - arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts | 17 + + arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts | 30 + arch/arm/boot/dts/overlays/rpi-proto-overlay.dts | 39 + arch/arm/boot/dts/overlays/rpi-sense-overlay.dts | 47 + arch/arm/boot/dts/overlays/rpi-tv-overlay.dts | 31 + @@ -83233,7 +83285,7 @@ Signed-off-by: Phil Elwell arch/arm/boot/dts/overlays/wittypi-overlay.dts | 44 + scripts/Makefile.dtbinst | 8 +- scripts/Makefile.lib | 11 + - 137 files changed, 10869 insertions(+), 6 deletions(-) + 139 files changed, 11113 insertions(+), 3 deletions(-) create mode 100644 arch/arm/boot/dts/bcm2708-rpi-0-w.dts create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b-plus.dts create mode 100644 arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -83277,6 +83329,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/goodix-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/googlevoicehat-soundcard-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/gpio-ir-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/gpio-shutdown-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/hifiberry-amp-overlay.dts @@ -83312,6 +83365,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/mmc-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/mpu6050-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/mz61581-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/papirus-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-bt-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/pi3-disable-wifi-overlay.dts @@ -83325,6 +83379,7 @@ Signed-off-by: Phil Elwell create mode 100644 arch/arm/boot/dts/overlays/pitft35-resistive-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/pps-gpio-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/pwm-2chan-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/pwm-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/qca7000-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/raspidac3-overlay.dts @@ -83433,16 +83488,25 @@ index eff87a3445662c767bf6f4b24a94620148ab11e3..d85b3a4d051b45b6c60c137d725587bf +endif diff --git a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts new file mode 100644 -index 0000000000000000000000000000000000000000..fba0041d5546871be643dc8b671db3a153d5c801 +index 0000000000000000000000000000000000000000..8299f8a4e2a436f443e9c95c468583d538787c0f --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts -@@ -0,0 +1,162 @@ +@@ -0,0 +1,165 @@ +/dts-v1/; + +#include "bcm2708.dtsi" + +/ { + model = "Raspberry Pi Zero W"; ++ ++ chosen { ++ bootargs = "8250.nr_uarts=1"; ++ }; ++ ++ aliases { ++ serial0 = &uart1; ++ serial1 = &uart0; ++ }; +}; + +&gpio { @@ -83531,7 +83595,7 @@ index 0000000000000000000000000000000000000000..fba0041d5546871be643dc8b671db3a1 + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; + + spidev1: spidev@1{ @@ -83539,7 +83603,7 @@ index 0000000000000000000000000000000000000000..fba0041d5546871be643dc8b671db3a1 + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; +}; + @@ -83587,12 +83651,6 @@ index 0000000000000000000000000000000000000000..fba0041d5546871be643dc8b671db3a1 +}; + +/ { -+ chosen { -+ bootargs = "8250.nr_uarts=1"; -+ }; -+}; -+ -+/ { + __overrides__ { + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; @@ -83601,7 +83659,7 @@ index 0000000000000000000000000000000000000000..fba0041d5546871be643dc8b671db3a1 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts new file mode 100644 -index 0000000000000000000000000000000000000000..373bfd02786c6d912c3fc5ebb2f3dcebb5ebf82b +index 0000000000000000000000000000000000000000..31db4fd917a40d949acbabfc9ae1367f85933f9a --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -0,0 +1,122 @@ @@ -83660,7 +83718,7 @@ index 0000000000000000000000000000000000000000..373bfd02786c6d912c3fc5ebb2f3dceb + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; + + spidev1: spidev@1{ @@ -83668,7 +83726,7 @@ index 0000000000000000000000000000000000000000..373bfd02786c6d912c3fc5ebb2f3dceb + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; +}; + @@ -83729,7 +83787,7 @@ index 0000000000000000000000000000000000000000..373bfd02786c6d912c3fc5ebb2f3dceb +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts new file mode 100644 -index 0000000000000000000000000000000000000000..7e5151ad52a661f482b1de355210b5587417e87c +index 0000000000000000000000000000000000000000..ffe5d14feb9f671b6a574c55c115e331fac22c4d --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -0,0 +1,112 @@ @@ -83788,7 +83846,7 @@ index 0000000000000000000000000000000000000000..7e5151ad52a661f482b1de355210b558 + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; + + spidev1: spidev@1{ @@ -83796,7 +83854,7 @@ index 0000000000000000000000000000000000000000..7e5151ad52a661f482b1de355210b558 + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; +}; + @@ -83847,7 +83905,7 @@ index 0000000000000000000000000000000000000000..7e5151ad52a661f482b1de355210b558 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts new file mode 100644 -index 0000000000000000000000000000000000000000..935867a7bb46addd9e205f93cb9db45b92722fa3 +index 0000000000000000000000000000000000000000..0b0d23256edd74fca11a0e6479f4d048aec75717 --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -0,0 +1,95 @@ @@ -83905,7 +83963,7 @@ index 0000000000000000000000000000000000000000..935867a7bb46addd9e205f93cb9db45b + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; + + spidev1: spidev@1{ @@ -83913,7 +83971,7 @@ index 0000000000000000000000000000000000000000..935867a7bb46addd9e205f93cb9db45b + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; +}; + @@ -83971,7 +84029,7 @@ index 0000000000000000000000000000000000000000..d0299e3d9a09ddcdad80cb0957b30b14 +}; diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi new file mode 100644 -index 0000000000000000000000000000000000000000..f88b844f0aff82742966fd820f6f69cf25c2dfab +index 0000000000000000000000000000000000000000..46a4d33e148438e4ca7c8cc17a328705000b1b3a --- /dev/null +++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi @@ -0,0 +1,162 @@ @@ -84014,6 +84072,7 @@ index 0000000000000000000000000000000000000000..f88b844f0aff82742966fd820f6f69cf + fb = &fb; + vchiq = &vchiq; + thermal = &thermal; ++ axiperf = &axiperf; + }; + + leds: leds { @@ -84096,6 +84155,7 @@ index 0000000000000000000000000000000000000000..f88b844f0aff82742966fd820f6f69cf + sd_force_pio = <&sdhost>,"brcm,force-pio?"; + sd_pio_limit = <&sdhost>,"brcm,pio-limit:0"; + sd_debug = <&sdhost>,"brcm,debug"; ++ axiperf = <&axiperf>,"status"; + }; +}; + @@ -84133,8 +84193,6 @@ index 0000000000000000000000000000000000000000..f88b844f0aff82742966fd820f6f69cf +}; + +&cpu_thermal { -+ coefficients = <(-538) 407000>; -+ + /delete-node/ trips; +}; diff --git a/arch/arm/boot/dts/bcm2708.dtsi b/arch/arm/boot/dts/bcm2708.dtsi @@ -84165,7 +84223,7 @@ index 0000000000000000000000000000000000000000..756bd3687b488da98f749b27ddfe0986 +}; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts new file mode 100644 -index 0000000000000000000000000000000000000000..434c451928b4830530d008d9c9ede9b0fc0c1b92 +index 0000000000000000000000000000000000000000..b7d48347066597e5d1e183e7c58330daf12f4e9b --- /dev/null +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -0,0 +1,122 @@ @@ -84224,7 +84282,7 @@ index 0000000000000000000000000000000000000000..434c451928b4830530d008d9c9ede9b0 + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; + + spidev1: spidev@1{ @@ -84232,7 +84290,7 @@ index 0000000000000000000000000000000000000000..434c451928b4830530d008d9c9ede9b0 + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; +}; + @@ -84321,10 +84379,10 @@ index 0000000000000000000000000000000000000000..343437db94820bb75a9b81e8bc6ecf6f +}; diff --git a/arch/arm/boot/dts/bcm270x.dtsi b/arch/arm/boot/dts/bcm270x.dtsi new file mode 100644 -index 0000000000000000000000000000000000000000..81914a615c8b011fe7d70a2e14f16491947c49b7 +index 0000000000000000000000000000000000000000..a3544c1f5b9dce153bb22f94b6728d6ecd901777 --- /dev/null +++ b/arch/arm/boot/dts/bcm270x.dtsi -@@ -0,0 +1,145 @@ +@@ -0,0 +1,181 @@ +/* Downstream bcm283x.dtsi diff */ +#include "dt-bindings/power/raspberrypi-power.h" + @@ -84353,6 +84411,11 @@ index 0000000000000000000000000000000000000000..81914a615c8b011fe7d70a2e14f16491 + interrupts = <2 17>, <2 18>; + }; + ++ serial@7e201000 { /* uart0 */ ++ /* Enable CTS bug workaround */ ++ cts-event-workaround; ++ }; ++ + i2s@7e203000 { /* i2s */ + #sound-dai-cells = <0>; + reg = <0x7e203000 0x24>; @@ -84452,6 +84515,14 @@ index 0000000000000000000000000000000000000000..81914a615c8b011fe7d70a2e14f16491 + /* Add alias */ + status = "disabled"; + }; ++ ++ axiperf: axiperf { ++ compatible = "brcm,bcm2835-axiperf"; ++ reg = <0x7e009800 0x100>, ++ <0x7ee08000 0x100>; ++ firmware = <&firmware>; ++ status = "disabled"; ++ }; + }; + + vdd_5v0_reg: fixedregulator_5v0 { @@ -84470,12 +84541,35 @@ index 0000000000000000000000000000000000000000..81914a615c8b011fe7d70a2e14f16491 + regulator-always-on; + }; +}; ++ ++/* Configure and use the auxilliary interrupt controller */ ++ ++&aux { ++ interrupts = <1 29>; ++ interrupt-controller; ++ #interrupt-cells = <1>; ++}; ++ ++&uart1 { ++ interrupt-parent = <&aux>; ++ interrupts = <0>; ++}; ++ ++&spi1 { ++ interrupt-parent = <&aux>; ++ interrupts = <1>; ++}; ++ ++&spi2 { ++ interrupt-parent = <&aux>; ++ interrupts = <2>; ++}; diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts new file mode 100644 -index 0000000000000000000000000000000000000000..634add7ab8bc0aa5501508c97050b101aa0e94f4 +index 0000000000000000000000000000000000000000..a72c2fed5c52444fbc80daf23e1bf8f7c6f70e7f --- /dev/null +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -@@ -0,0 +1,191 @@ +@@ -0,0 +1,194 @@ +/dts-v1/; + +#ifdef RPI364 @@ -84487,6 +84581,15 @@ index 0000000000000000000000000000000000000000..634add7ab8bc0aa5501508c97050b101 + +/ { + model = "Raspberry Pi 3 Model B"; ++ ++ chosen { ++ bootargs = "8250.nr_uarts=1"; ++ }; ++ ++ aliases { ++ serial0 = &uart1; ++ serial1 = &uart0; ++ }; +}; + +&gpio { @@ -84594,7 +84697,7 @@ index 0000000000000000000000000000000000000000..634add7ab8bc0aa5501508c97050b101 + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; + + spidev1: spidev@1{ @@ -84602,7 +84705,7 @@ index 0000000000000000000000000000000000000000..634add7ab8bc0aa5501508c97050b101 + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; +}; + @@ -84651,12 +84754,6 @@ index 0000000000000000000000000000000000000000..634add7ab8bc0aa5501508c97050b101 +}; + +/ { -+ chosen { -+ bootargs = "8250.nr_uarts=1"; -+ }; -+}; -+ -+/ { + __overrides__ { + act_led_gpio = <&act_led>,"gpios:4"; + act_led_activelow = <&act_led>,"gpios:8"; @@ -84669,7 +84766,7 @@ index 0000000000000000000000000000000000000000..634add7ab8bc0aa5501508c97050b101 +}; diff --git a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts new file mode 100644 -index 0000000000000000000000000000000000000000..a84552eca6a54dafd6d016dfb60e9d4ce064041f +index 0000000000000000000000000000000000000000..2500641c14dc3f01421351738b1e0f01ad73772d --- /dev/null +++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts @@ -0,0 +1,129 @@ @@ -84745,7 +84842,7 @@ index 0000000000000000000000000000000000000000..a84552eca6a54dafd6d016dfb60e9d4c + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; + + spidev1: spidev@1{ @@ -84753,7 +84850,7 @@ index 0000000000000000000000000000000000000000..a84552eca6a54dafd6d016dfb60e9d4c + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + }; +}; + @@ -84804,30 +84901,18 @@ index 0000000000000000000000000000000000000000..a84552eca6a54dafd6d016dfb60e9d4c +}; diff --git a/arch/arm/boot/dts/bcm2710.dtsi b/arch/arm/boot/dts/bcm2710.dtsi new file mode 100644 -index 0000000000000000000000000000000000000000..3e134a1208610b90e2d0fc22f03c6e9f372bfcd7 +index 0000000000000000000000000000000000000000..d5ce5b60fb3b63a76831504c53145f828b089993 --- /dev/null +++ b/arch/arm/boot/dts/bcm2710.dtsi -@@ -0,0 +1,148 @@ -+#include "bcm283x.dtsi" +@@ -0,0 +1,32 @@ ++#include "bcm2837.dtsi" +#include "bcm270x.dtsi" +#include "bcm2708-rpi.dtsi" + +/ { + compatible = "brcm,bcm2837", "brcm,bcm2836"; -+ model = "BCM2837"; + + soc { -+ ranges = <0x7e000000 0x3f000000 0x01000000>, -+ <0x40000000 0x40000000 0x00040000>; -+ dma-ranges = <0xc0000000 0x00000000 0x3f000000>; -+ -+ local_intc: local_intc { -+ compatible = "brcm,bcm2836-l1-intc"; -+ reg = <0x40000000 0x100>; -+ interrupt-controller; -+ #interrupt-cells = <1>; -+ interrupt-parent = <&local_intc>; -+ }; + + arm-pmu { +#ifdef RPI364 @@ -84839,179 +84924,25 @@ index 0000000000000000000000000000000000000000..3e134a1208610b90e2d0fc22f03c6e9f + interrupts = <9>; + }; + -+ timer { -+#ifdef RPI364 -+ compatible = "arm,armv8-timer", "arm,armv7-timer"; -+#else -+ compatible = "arm,armv7-timer"; -+#endif -+ interrupt-parent = <&local_intc>; -+ interrupts = <0>, // PHYS_SECURE_PPI -+ <1>, // PHYS_NONSECURE_PPI -+ <3>, // VIRT_PPI -+ <2>; // HYP_PPI -+ always-on; -+ }; -+ + syscon@40000000 { + compatible = "brcm,bcm2836-arm-local", "syscon"; + reg = <0x40000000 0x100>; + }; + }; + -+#ifdef RPI364 -+ cpus: cpus { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ v8_cpu0: cpu@0 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a53", "arm,armv8"; -+ reg = <0x0>; -+ clock-frequency = <1200000000>; -+ }; -+ -+ v8_cpu1: cpu@1 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a53", "arm,armv8"; -+ reg = <0x1>; -+ clock-frequency = <1200000000>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000e0>; -+ }; -+ -+ v8_cpu2: cpu@2 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a53", "arm,armv8"; -+ reg = <0x2>; -+ clock-frequency = <1200000000>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000e8>; -+ }; -+ -+ v8_cpu3: cpu@3 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a53", "arm,armv8"; -+ reg = <0x3>; -+ clock-frequency = <1200000000>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000f0>; -+ }; -+ }; -+ + __overrides__ { -+ arm_freq = <&v8_cpu0>, "clock-frequency:0", -+ <&v8_cpu1>, "clock-frequency:0", -+ <&v8_cpu2>, "clock-frequency:0", -+ <&v8_cpu3>, "clock-frequency:0"; ++ arm_freq = <&cpu0>, "clock-frequency:0", ++ <&cpu1>, "clock-frequency:0", ++ <&cpu2>, "clock-frequency:0", ++ <&cpu3>, "clock-frequency:0"; + }; -+ -+#else -+ cpus: cpus { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ v7_cpu0: cpu@0 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0x000>; -+ clock-frequency = <800000000>; -+ }; -+ -+ v7_cpu1: cpu@1 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0x001>; -+ clock-frequency = <800000000>; -+ }; -+ -+ v7_cpu2: cpu@2 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0x002>; -+ clock-frequency = <800000000>; -+ }; -+ -+ v7_cpu3: cpu@3 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0x003>; -+ clock-frequency = <800000000>; -+ }; -+ }; -+ -+ __overrides__ { -+ arm_freq = <&v7_cpu0>, "clock-frequency:0", -+ <&v7_cpu1>, "clock-frequency:0", -+ <&v7_cpu2>, "clock-frequency:0", -+ <&v7_cpu3>, "clock-frequency:0"; -+ }; -+#endif +}; -+ -+&intc { -+ compatible = "brcm,bcm2836-armctrl-ic"; -+ reg = <0x7e00b200 0x200>; -+ interrupt-parent = <&local_intc>; -+ interrupts = <8>; -+}; -+ -diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi -index 013431e3d7c3140d3a0645bdf4f130e9a860f984..8617ffdb2463ff307a3de32b74003e8a621119d5 100644 ---- a/arch/arm/boot/dts/bcm283x.dtsi -+++ b/arch/arm/boot/dts/bcm283x.dtsi -@@ -413,6 +413,7 @@ - #address-cells = <1>; - #size-cells = <0>; - status = "disabled"; -+ cs-gpios = <&gpio 8 1>, <&gpio 7 1>; - }; - - i2c0: i2c@7e205000 { -@@ -469,12 +470,16 @@ - #clock-cells = <1>; - reg = <0x7e215000 0x8>; - clocks = <&clocks BCM2835_CLOCK_VPU>; -+ interrupts = <1 29>; -+ interrupt-controller; -+ #interrupt-cells = <1>; - }; - - uart1: serial@7e215040 { - compatible = "brcm,bcm2835-aux-uart"; - reg = <0x7e215040 0x40>; -- interrupts = <1 29>; -+ interrupt-parent = <&aux>; -+ interrupts = <0>; - clocks = <&aux BCM2835_AUX_CLOCK_UART>; - status = "disabled"; - }; -@@ -482,7 +487,8 @@ - spi1: spi@7e215080 { - compatible = "brcm,bcm2835-aux-spi"; - reg = <0x7e215080 0x40>; -- interrupts = <1 29>; -+ interrupt-parent = <&aux>; -+ interrupts = <1>; - clocks = <&aux BCM2835_AUX_CLOCK_SPI1>; - #address-cells = <1>; - #size-cells = <0>; -@@ -492,7 +498,8 @@ - spi2: spi@7e2150c0 { - compatible = "brcm,bcm2835-aux-spi"; - reg = <0x7e2150c0 0x40>; -- interrupts = <1 29>; -+ interrupt-parent = <&aux>; -+ interrupts = <2>; - clocks = <&aux BCM2835_AUX_CLOCK_SPI2>; - #address-cells = <1>; - #size-cells = <0>; diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile new file mode 100644 -index 0000000000000000000000000000000000000000..c50b1dfa9d7334df47ce087f9d2a7a816afa05ba +index 0000000000000000000000000000000000000000..b8771396608df877ca0832ce2b36972530c655bc --- /dev/null +++ b/arch/arm/boot/dts/overlays/Makefile -@@ -0,0 +1,125 @@ +@@ -0,0 +1,128 @@ +# Overlays for the Raspberry Pi platform + +dtbo-$(CONFIG_ARCH_BCM2835) += \ @@ -85043,6 +84974,7 @@ index 0000000000000000000000000000000000000000..c50b1dfa9d7334df47ce087f9d2a7a81 + goodix.dtbo \ + googlevoicehat-soundcard.dtbo \ + gpio-ir.dtbo \ ++ gpio-ir-tx.dtbo \ + gpio-poweroff.dtbo \ + gpio-shutdown.dtbo \ + hifiberry-amp.dtbo \ @@ -85078,6 +85010,7 @@ index 0000000000000000000000000000000000000000..c50b1dfa9d7334df47ce087f9d2a7a81 + mmc.dtbo \ + mpu6050.dtbo \ + mz61581.dtbo \ ++ papirus.dtbo \ + pi3-act-led.dtbo \ + pi3-disable-bt.dtbo \ + pi3-disable-wifi.dtbo \ @@ -85092,6 +85025,7 @@ index 0000000000000000000000000000000000000000..c50b1dfa9d7334df47ce087f9d2a7a81 + pps-gpio.dtbo \ + pwm.dtbo \ + pwm-2chan.dtbo \ ++ pwm-ir-tx.dtbo \ + qca7000.dtbo \ + raspidac3.dtbo \ + rotary-encoder.dtbo \ @@ -85139,10 +85073,10 @@ index 0000000000000000000000000000000000000000..c50b1dfa9d7334df47ce087f9d2a7a81 +clean-files := *.dtbo diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README new file mode 100644 -index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2d4d708ef +index 0000000000000000000000000000000000000000..8f2da2ab4e1858e60b403a21c29b23caf69c3c61 --- /dev/null +++ b/arch/arm/boot/dts/overlays/README -@@ -0,0 +1,1620 @@ +@@ -0,0 +1,1678 @@ +Introduction +============ + @@ -85178,6 +85112,9 @@ index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2 +Configuring additional, optional hardware is done using Device Tree overlays +(see below). + ++GPIO numbering uses the hardware pin numbering scheme (aka BCM scheme) and ++not the physical pin numbers. ++ +raspi-config +============ + @@ -85640,8 +85577,20 @@ index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2 + ir-keytable), defaults to "rc-rc6-mce" + + ++Name: gpio-ir-tx ++Info: Use GPIO pin as bit-banged infrared transmitter output. ++ This is an alternative to "pwm-ir-tx". gpio-ir-tx doesn't require ++ a PWM so it can be used together with onboard analog audio. ++Load: dtoverlay=gpio-ir-tx,= ++Params: gpio_pin Output GPIO (default 18) ++ ++ invert "1" = invert the output (make it active-low). ++ Default is "0" (active-high). ++ ++ +Name: gpio-poweroff -+Info: Drives a GPIO high or low on poweroff (including halt) ++Info: Drives a GPIO high or low on poweroff (including halt). Enabling this ++ overlay will prevent the ability to boot by driving GPIO3 low. +Load: dtoverlay=gpio-poweroff,= +Params: gpiopin GPIO for signalling (default 26) + @@ -85819,6 +85768,8 @@ index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2 + + ds3231 Select the DS3231 device + ++ m41t62 Select the M41T62 device ++ + mcp7940x Select the MCP7940x device + + mcp7941x Select the MCP7941x device @@ -85884,8 +85835,8 @@ index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2 +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, TMP102 -+ or LM75 ++Params: addr Set the address for the BME280, BMP280, TMP102, ++ HDC100X, LM75 or SHT3x + + bme280 Select the Bosch Sensortronic BME280 + Valid addresses 0x76-0x77, default 0x76 @@ -85897,6 +85848,9 @@ index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2 + bmp280 Select the Bosch Sensortronic BMP280 + Valid addresses 0x76-0x77, default 0x76 + ++ hdc100x Select the Texas Instruments HDC100x temp sensor ++ Valid addresses 0x40-0x43, default 0x40 ++ + htu21 Select the HTU21 temperature and humidity sensor + + lm75 Select the Maxim LM75 temperature sensor @@ -85910,6 +85864,16 @@ index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2 + tmp102 Select the Texas Instruments TMP102 temp sensor + Valid addresses 0x48-0x4b, default 0x48 + ++ tsl4531 Select the AMS TSL4531 digital ambient light ++ sensor ++ ++ veml6070 Select the Vishay VEML6070 ultraviolet light ++ sensor ++ ++ sht3x Select the Sensiron SHT3x temperature and ++ humidity sensor. Valid addresses 0x44-0x45, ++ default 0x44 ++ + +Name: i2c0-bcm2708 +Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations @@ -86146,6 +86110,17 @@ index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2 + xohms Touchpanel sensitivity (X-plate resistance) + + ++Name: papirus ++Info: PaPiRus ePaper Screen by Pi Supply (both HAT and pHAT) ++Load: dtoverlay=papirus,= ++Params: panel Display panel (required): ++ 1.44": e1144cs021 ++ 2.0": e2200cs021 ++ 2.7": e2271cs021 ++ ++ speed Display SPI bus speed ++ ++ +[ The pcf2127-rtc overlay has been deleted. See i2c-rtc. ] + + @@ -86340,6 +86315,19 @@ index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2 + clock PWM clock frequency (informational) + + ++Name: pwm-ir-tx ++Info: Use GPIO pin as pwm-assisted infrared transmitter output. ++ This is an alternative to "gpio-ir-tx". pwm-ir-tx makes use ++ of PWM0 to reduce the CPU load during transmission compared to ++ gpio-ir-tx which uses bit-banging. ++ Legal pin,function combinations are: ++ 12,4(Alt0) 18,2(Alt5) 40,4(Alt0) 52,5(Alt1) ++Load: dtoverlay=pwm-ir-tx,= ++Params: gpio_pin Output GPIO (default 18) ++ ++ func Pin function (default 2 = Alt5) ++ ++ +Name: qca7000 +Info: I2SE's Evaluation Board for PLC Stamp micro +Load: dtoverlay=qca7000,= @@ -86394,8 +86382,12 @@ index 0000000000000000000000000000000000000000..e6d777a601c91d192bc5713f9a73e1a2 + +Name: rpi-ft5406 +Info: Official Raspberry Pi display touchscreen -+Load: dtoverlay=rpi-ft5406 -+Params: ++Load: dtoverlay=rpi-ft5406,= ++Params: touchscreen-size-x Touchscreen X resolution (default 800) ++ touchscreen-size-y Touchscreen Y resolution (default 600); ++ touchscreen-inverted-x Invert touchscreen X coordinates (default 0); ++ touchscreen-inverted-y Invert touchscreen Y coordinates (default 0); ++ touchscreen-swapped-x-y Swap X and Y cordinates (default 0); + + +Name: rpi-proto @@ -88313,6 +88305,46 @@ index 0000000000000000000000000000000000000000..af5baf7ddc92be7a59ad3d5f9a9fefba + rc-map-name = <&gpio_ir>,"linux,rc-map-name"; // default rc map + }; +}; +diff --git a/arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts b/arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..a2e271f0f2029acec85637c0ffa9dc5b2f0463a8 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts +@@ -0,0 +1,34 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&gpio>; ++ __overlay__ { ++ gpio_ir_tx_pins: gpio_ir_tx_pins { ++ brcm,pins = <18>; ++ brcm,function = <1>; // out ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "/"; ++ __overlay__ { ++ gpio_ir_tx: gpio-ir-transmitter { ++ compatible = "gpio-ir-tx"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio_ir_tx_pins>; ++ gpios = <&gpio 18 0>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ gpio_pin = <&gpio_ir_tx>, "gpios:4", ++ <&gpio_ir_tx_pins>, "brcm,pins:0"; // pin number ++ invert = <&gpio_ir_tx>, "gpios:8"; // 1 = active low ++ }; ++}; diff --git a/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts b/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..ff8cb36d94d4940d5151ace24afc4ad1a9aa9fb6 @@ -89374,10 +89406,10 @@ index 0000000000000000000000000000000000000000..8415e6081428fba9a47682964174fc02 +}; diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..6140f172a86b8731782f938f76cb5dac9f28b662 +index 0000000000000000000000000000000000000000..fcb846a50d19cb97fc73de8b801962ac96416c20 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -@@ -0,0 +1,164 @@ +@@ -0,0 +1,181 @@ +// Definitions for several I2C based Real Time Clocks +/dts-v1/; +/plugin/; @@ -89523,6 +89555,21 @@ index 0000000000000000000000000000000000000000..6140f172a86b8731782f938f76cb5dac + }; + }; + ++ fragment@9 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ m41t62: m41t62@68 { ++ compatible = "st,m41t62"; ++ reg = <0x68>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ + __overrides__ { + abx80x = <0>,"+0"; + ds1307 = <0>,"+1"; @@ -89533,21 +89580,23 @@ index 0000000000000000000000000000000000000000..6140f172a86b8731782f938f76cb5dac + pcf2127 = <0>,"+6"; + pcf8523 = <0>,"+7"; + pcf8563 = <0>,"+8"; ++ m41t62 = <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?"; ++ <&mcp7941x>,"wakeup-source?", ++ <&m41t62>,"wakeup-source?"; + }; +}; diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..17c27e3b666a7a83619471b50c63bb93836653c5 +index 0000000000000000000000000000000000000000..0b9bc8ff9dd2f192c17cd92da248f7a3d4e4fc66 --- /dev/null +++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -@@ -0,0 +1,142 @@ +@@ -0,0 +1,206 @@ +// Definitions for I2C based sensors using the Industrial IO or HWMON interface. +/dts-v1/; +/plugin/; @@ -89676,9 +89725,69 @@ index 0000000000000000000000000000000000000000..17c27e3b666a7a83619471b50c63bb93 + }; + }; + ++ fragment@8 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ hdc100x: hdc100x@40 { ++ compatible = "hdc100x"; ++ reg = <0x40>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@9 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ tsl4531: tsl4531@29 { ++ compatible = "tsl4531"; ++ reg = <0x29>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@10 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ veml6070: veml6070@38 { ++ compatible = "veml6070"; ++ reg = <0x38>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@11 { ++ target = <&i2c_arm>; ++ __dormant__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ sht3x: sht3x@44 { ++ compatible = "sht3x"; ++ reg = <0x44>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ + __overrides__ { + addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0", -+ <&lm75>,"reg:0"; ++ <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0"; + bme280 = <0>,"+0"; + bmp085 = <0>,"+1"; + bmp180 = <0>,"+2"; @@ -89688,6 +89797,10 @@ index 0000000000000000000000000000000000000000..17c27e3b666a7a83619471b50c63bb93 + lm75addr = <&lm75>,"reg:0"; + si7020 = <0>,"+6"; + tmp102 = <0>,"+7"; ++ hdc100x = <0>,"+8"; ++ tsl4531 = <0>,"+9"; ++ veml6070 = <0>,"+10"; ++ sht3x = <0>,"+11"; + }; +}; diff --git a/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts b/arch/arm/boot/dts/overlays/i2c0-bcm2708-overlay.dts @@ -90943,7 +91056,7 @@ index 0000000000000000000000000000000000000000..7dcbacb3cd007eb15b2b0f165fd8adc7 + diff --git a/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts new file mode 100755 -index 0000000000000000000000000000000000000000..c96cdae27fb15055c4a6ec55d1ee45644768c392 +index 0000000000000000000000000000000000000000..03eb5486fa9c4cdb74cfc7a228dc7cea0105b8b5 --- /dev/null +++ b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts @@ -0,0 +1,73 @@ @@ -91009,7 +91122,7 @@ index 0000000000000000000000000000000000000000..c96cdae27fb15055c4a6ec55d1ee4564 + pinctrl-0 = <&can0_pins>; + spi-max-frequency = <10000000>; + interrupt-parent = <&gpio>; -+ interrupts = <25 0x2>; ++ interrupts = <25 8>; /* IRQ_TYPE_LEVEL_LOW */ + clocks = <&can0_osc>; + }; + }; @@ -91022,7 +91135,7 @@ index 0000000000000000000000000000000000000000..c96cdae27fb15055c4a6ec55d1ee4564 +}; diff --git a/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..67bd0d9bdaa2ff767d284010a69ecfe3f2aa1fd1 +index 0000000000000000000000000000000000000000..dc773fa3b50cea849ffede35f42d30175c11718c --- /dev/null +++ b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts @@ -0,0 +1,73 @@ @@ -91088,7 +91201,7 @@ index 0000000000000000000000000000000000000000..67bd0d9bdaa2ff767d284010a69ecfe3 + pinctrl-0 = <&can1_pins>; + spi-max-frequency = <10000000>; + interrupt-parent = <&gpio>; -+ interrupts = <25 0x2>; ++ interrupts = <25 8>; /* IRQ_TYPE_LEVEL_LOW */ + clocks = <&can1_osc>; + }; + }; @@ -91603,6 +91716,101 @@ index 0000000000000000000000000000000000000000..2c29aaed44c5959d7f0df2a3baf2af05 + xohms = <&mz61581_ts>,"ti,x-plate-ohms;0"; + }; +}; +diff --git a/arch/arm/boot/dts/overlays/papirus-overlay.dts b/arch/arm/boot/dts/overlays/papirus-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..58eb8847f9ed8746cbffdbf4cdc83711a9201e83 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/papirus-overlay.dts +@@ -0,0 +1,89 @@ ++/* PaPiRus ePaper Screen by Pi Supply */ ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&i2c_arm>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ display_temp: lm75@48 { ++ compatible = "lm75b"; ++ reg = <0x48>; ++ status = "okay"; ++ #thermal-sensor-cells = <0>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target-path = "/"; ++ __overlay__ { ++ thermal-zones { ++ display { ++ polling-delay-passive = <0>; ++ polling-delay = <0>; ++ thermal-sensors = <&display_temp>; ++ }; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&spi0>; ++ __overlay__ { ++ status = "okay"; ++ ++ spidev@0{ ++ status = "disabled"; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&gpio>; ++ __overlay__ { ++ repaper_pins: repaper_pins { ++ brcm,pins = <14 15 23 24 25>; ++ brcm,function = <1 1 1 1 0>; /* out out out out in */ ++ }; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&spi0>; ++ __overlay__ { ++ /* needed to avoid dtc warning */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ repaper: repaper@0{ ++ compatible = "not_set"; ++ reg = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&repaper_pins>; ++ ++ spi-max-frequency = <8000000>; ++ ++ panel-on-gpios = <&gpio 23 0>; ++ border-gpios = <&gpio 14 0>; ++ discharge-gpios = <&gpio 15 0>; ++ reset-gpios = <&gpio 24 0>; ++ busy-gpios = <&gpio 25 0>; ++ ++ repaper-thermal-zone = "display"; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ panel = <&repaper>, "compatible"; ++ speed = <&repaper>, "spi-max-frequency:0"; ++ }; ++}; diff --git a/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts b/arch/arm/boot/dts/overlays/pi3-act-led-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..14a59dcf13ca64eb0bdbd34d70690a11abe83cfa @@ -91709,10 +91917,10 @@ index 0000000000000000000000000000000000000000..017199554bf2f4e381efcc7bb71e750c +}; diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..18f77453c38dbbf33f3726a5b4cce15b9f20f390 +index 0000000000000000000000000000000000000000..98381656945f5b84d96b9e496366b99109b4fbe7 --- /dev/null +++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -@@ -0,0 +1,64 @@ +@@ -0,0 +1,74 @@ +/dts-v1/; +/plugin/; + @@ -91746,7 +91954,7 @@ index 0000000000000000000000000000000000000000..18f77453c38dbbf33f3726a5b4cce15b + target = <&uart1>; + __overlay__ { + pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins &bt_pins>; ++ pinctrl-0 = <&uart1_pins &bt_pins &fake_bt_cts>; + status = "okay"; + }; + }; @@ -91770,6 +91978,16 @@ index 0000000000000000000000000000000000000000..18f77453c38dbbf33f3726a5b4cce15b + }; + + fragment@4 { ++ target = <&gpio>; ++ __overlay__ { ++ fake_bt_cts: fake_bt_cts { ++ brcm,pins = <31>; ++ brcm,function = <1>; /* output */ ++ }; ++ }; ++ }; ++ ++ fragment@5 { + target-path = "/aliases"; + __overlay__ { + serial0 = "/soc/serial@7e201000"; @@ -92643,6 +92861,52 @@ index 0000000000000000000000000000000000000000..abdeddd0f2c873e2b1fffcf6f2b838ee + clock = <&frag1>,"assigned-clock-rates:0"; + }; +}; +diff --git a/arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts b/arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts +new file mode 100644 +index 0000000000000000000000000000000000000000..141c126fe33b90a16fea396b8e27692dc5274170 +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts +@@ -0,0 +1,40 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2708"; ++ ++ fragment@0 { ++ target = <&gpio>; ++ __overlay__ { ++ pwm0_pins: pwm0_pins { ++ brcm,pins = <18>; ++ brcm,function = <2>; /* Alt5 */ ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&pwm>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm0_pins>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "/"; ++ __overlay__ { ++ pwm-ir-transmitter { ++ compatible = "pwm-ir-tx"; ++ pwms = <&pwm 0 100>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ gpio_pin = <&pwm0_pins>, "brcm,pins:0"; ++ func = <&pwm0_pins>,"brcm,function:0"; ++ }; ++}; diff --git a/arch/arm/boot/dts/overlays/pwm-overlay.dts b/arch/arm/boot/dts/overlays/pwm-overlay.dts new file mode 100644 index 0000000000000000000000000000000000000000..27809e8dc74660a8e922a1aff1bb2ca7186e411c @@ -93170,10 +93434,10 @@ index 0000000000000000000000000000000000000000..d7e72eef594e08b309ffbaa04f43c689 +}; diff --git a/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..2e53a17491706bdb6245426b548a54960a40966f +index 0000000000000000000000000000000000000000..d4607b9d1cbfc38c6dd8b504aa00921d9590f6da --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts -@@ -0,0 +1,17 @@ +@@ -0,0 +1,30 @@ +/dts-v1/; +/plugin/; + @@ -93187,9 +93451,22 @@ index 0000000000000000000000000000000000000000..2e53a17491706bdb6245426b548a5496 + compatible = "rpi,rpi-ft5406"; + firmware = <&firmware>; + status = "okay"; ++ touchscreen-size-x = <800>; ++ touchscreen-size-y = <600>; ++ touchscreen-inverted-x = <0>; ++ touchscreen-inverted-y = <0>; ++ touchscreen-swapped-x-y = <0>; + }; + }; + }; ++ ++ __overrides__ { ++ touchscreen-size-x = <&rpi_ft5406>,"touchscreen-size-x:0"; ++ touchscreen-size-y = <&rpi_ft5406>,"touchscreen-size-y:0"; ++ touchscreen-inverted-x = <&rpi_ft5406>,"touchscreen-inverted-x:0"; ++ touchscreen-inverted-y = <&rpi_ft5406>,"touchscreen-inverted-y:0"; ++ touchscreen-swapped-x-y = <&rpi_ft5406>,"touchscreen-swapped-x-y:0"; ++ }; +}; diff --git a/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts b/arch/arm/boot/dts/overlays/rpi-proto-overlay.dts new file mode 100644 @@ -93930,7 +94207,7 @@ index 0000000000000000000000000000000000000000..ef9845f7184ee1ea90e8bdc23493b1cb +}; diff --git a/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..71c243947004fa887998065df9c259b50edfa428 +index 0000000000000000000000000000000000000000..c3d4f96b7aa92cd679cc8abc7c7aea1dc7c84eb6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts @@ -0,0 +1,57 @@ @@ -93972,7 +94249,7 @@ index 0000000000000000000000000000000000000000..71c243947004fa887998065df9c259b5 + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + }; @@ -93993,7 +94270,7 @@ index 0000000000000000000000000000000000000000..71c243947004fa887998065df9c259b5 +}; diff --git a/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..2ae0885cf1e7fb7420f65e538310ab1addafbece +index 0000000000000000000000000000000000000000..2ad62497dc895c6253c2a03b45e726e4f882d170 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts @@ -0,0 +1,69 @@ @@ -94035,7 +94312,7 @@ index 0000000000000000000000000000000000000000..2ae0885cf1e7fb7420f65e538310ab1a + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + @@ -94044,7 +94321,7 @@ index 0000000000000000000000000000000000000000..2ae0885cf1e7fb7420f65e538310ab1a + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + }; @@ -94068,7 +94345,7 @@ index 0000000000000000000000000000000000000000..2ae0885cf1e7fb7420f65e538310ab1a +}; diff --git a/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..8f79044cd8f47ea055394822cc380497c985c7e5 +index 0000000000000000000000000000000000000000..ef82890453bfe36afd124f6a01f4ca5116b809d4 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts @@ -0,0 +1,81 @@ @@ -94110,7 +94387,7 @@ index 0000000000000000000000000000000000000000..8f79044cd8f47ea055394822cc380497 + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + @@ -94119,7 +94396,7 @@ index 0000000000000000000000000000000000000000..8f79044cd8f47ea055394822cc380497 + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + @@ -94128,7 +94405,7 @@ index 0000000000000000000000000000000000000000..8f79044cd8f47ea055394822cc380497 + reg = <2>; /* CE2 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + }; @@ -94155,7 +94432,7 @@ index 0000000000000000000000000000000000000000..8f79044cd8f47ea055394822cc380497 +}; diff --git a/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..6f57bc710fe123028a5a216063733f0cea9bbd54 +index 0000000000000000000000000000000000000000..761b6be4ff9b55da1bf3979c905a3cc8d87ca6fb --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts @@ -0,0 +1,57 @@ @@ -94197,7 +94474,7 @@ index 0000000000000000000000000000000000000000..6f57bc710fe123028a5a216063733f0c + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + }; @@ -94218,7 +94495,7 @@ index 0000000000000000000000000000000000000000..6f57bc710fe123028a5a216063733f0c +}; diff --git a/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..d090631d36821b0c89833b9f217216f0b134a8f3 +index 0000000000000000000000000000000000000000..e533aba113deddd35ed3f9f6628eb130f1e09095 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts @@ -0,0 +1,69 @@ @@ -94260,7 +94537,7 @@ index 0000000000000000000000000000000000000000..d090631d36821b0c89833b9f217216f0 + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + @@ -94269,7 +94546,7 @@ index 0000000000000000000000000000000000000000..d090631d36821b0c89833b9f217216f0 + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + }; @@ -94293,7 +94570,7 @@ index 0000000000000000000000000000000000000000..d090631d36821b0c89833b9f217216f0 +}; diff --git a/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts new file mode 100644 -index 0000000000000000000000000000000000000000..e2586728c311829462f6a4b3b348e35603f033ce +index 0000000000000000000000000000000000000000..a62e107dc98fa484bcaad7f8caddfca450d0aea6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts @@ -0,0 +1,81 @@ @@ -94335,7 +94612,7 @@ index 0000000000000000000000000000000000000000..e2586728c311829462f6a4b3b348e356 + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + @@ -94344,7 +94621,7 @@ index 0000000000000000000000000000000000000000..e2586728c311829462f6a4b3b348e356 + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + @@ -94353,7 +94630,7 @@ index 0000000000000000000000000000000000000000..e2586728c311829462f6a4b3b348e356 + reg = <2>; /* CE2 */ + #address-cells = <1>; + #size-cells = <0>; -+ spi-max-frequency = <500000>; ++ spi-max-frequency = <125000000>; + status = "okay"; + }; + }; @@ -95137,10 +95414,10 @@ index 04b5633df1cfafa316f9086c4bf98a9ecf9d0939..d523d1e14220a369c4c766ca3a01208e # Bzip2 -From 8041279f9f49cfc46c955dcee8bbc8d320516dcf Mon Sep 17 00:00:00 2001 +From f251fcf745aba535ed4a942d520d644da5e6050c Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Feb 2015 13:50:57 +0000 -Subject: [PATCH 055/170] BCM270x_DT: Add pwr_led, and the required "input" +Subject: [PATCH 055/150] BCM270x_DT: Add pwr_led, and the required "input" trigger The "input" trigger makes the associated GPIO an input. This is to support @@ -95315,10 +95592,10 @@ index bf6db4fe895bcd67e04ee65e8f76ea104af6299f..8741dca6dba65e2d72fbdbc1702139c2 /* set_brightness_work / blink_timer flags, atomic, private. */ unsigned long work_flags; -From b9cb81475059fd789848ebda888396c2057ff6b9 Mon Sep 17 00:00:00 2001 +From 143690a1aa97db9ac343e58a1bb656057777b0be Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 056/170] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 056/150] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -95586,10 +95863,10 @@ index 6cd9b198b7c64eb94821f2e3f2c5201e6c6d25eb..f36c92c2da7487437c33f7a4e2c6e09e __u32 dx; /* screen-relative */ __u32 dy; -From 78ae0366227983b285a14740fc42aeff9eade306 Mon Sep 17 00:00:00 2001 +From 145bfac8fd6d4b77703f4fea9db90e183e99959e Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 057/170] Speed up console framebuffer imageblit function +Subject: [PATCH 057/150] 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 @@ -95798,10 +96075,10 @@ index a2bb276a8b2463eee98eb237c4647bc00cd93601..436494fba15abecb400ef28688466faf start_index, pitch_index); } else -From 6d56614dde3765a36a47ff40cd5694b4e07da1ae Mon Sep 17 00:00:00 2001 +From 3ee8a840abd103731fd182136d4c7d518f599ac1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 058/170] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 058/150] 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 @@ -96051,45 +96328,10 @@ index 5b2972946dda5f9ad415f1eaeaab67743a5cc0f0..b3558b7c9efb2484b40e31312aee197b u8, w1_slave_found_callback); }; -From 31498cad581c5feb2bfa417537540b560323a75e Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 14 Jul 2014 22:02:09 +0100 -Subject: [PATCH 059/170] hid: Reduce default mouse polling interval to 60Hz - -Reduces overhead when using X ---- - drivers/hid/usbhid/hid-core.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c -index 045b5da9b992873ce74f5d401de34855b93a6f8e..45abcbab4efe561a3829e9a6b6014abeb7d7797d 100644 ---- a/drivers/hid/usbhid/hid-core.c -+++ b/drivers/hid/usbhid/hid-core.c -@@ -48,7 +48,7 @@ - * Module parameters. - */ - --static unsigned int hid_mousepoll_interval; -+static unsigned int hid_mousepoll_interval = ~0; - module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); - MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); - -@@ -1098,7 +1098,9 @@ static int usbhid_start(struct hid_device *hid) - /* Change the polling interval of mice and joysticks. */ - switch (hid->collection->usage) { - case HID_GD_MOUSE: -- if (hid_mousepoll_interval > 0) -+ if (hid_mousepoll_interval == ~0 && interval < 16) -+ interval = 16; -+ else if (hid_mousepoll_interval != ~0 && hid_mousepoll_interval != 0) - interval = hid_mousepoll_interval; - break; - case HID_GD_JOYSTICK: - -From b77997c0718d9394274f22ce856a061ebea7abee Mon Sep 17 00:00:00 2001 +From 35a38cca06018a45a1a07c527071b2e9dfba1afe Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Tue, 12 May 2015 14:47:56 +0100 -Subject: [PATCH 060/170] rpi-ft5406: Add touchscreen driver for pi LCD display +Subject: [PATCH 059/150] 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 @@ -96099,11 +96341,10 @@ RPI-FT5406: Enable aarch64 support through explicit iomem interface Signed-off-by: Gerhard de Clercq --- - drivers/input/touchscreen/Kconfig | 7 + - drivers/input/touchscreen/Makefile | 1 + - drivers/input/touchscreen/rpi-ft5406.c | 292 +++++++++++++++++++++++++++++ - include/soc/bcm2835/raspberrypi-firmware.h | 1 + - 4 files changed, 301 insertions(+) + drivers/input/touchscreen/Kconfig | 7 + + drivers/input/touchscreen/Makefile | 1 + + drivers/input/touchscreen/rpi-ft5406.c | 292 +++++++++++++++++++++++++++++++++ + 3 files changed, 300 insertions(+) create mode 100644 drivers/input/touchscreen/rpi-ft5406.c diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig @@ -96434,23 +96675,11 @@ index 0000000000000000000000000000000000000000..9d7d05482355d168c5c0c42508cd9789 +MODULE_AUTHOR("Gordon Hollingworth"); +MODULE_DESCRIPTION("Touchscreen driver for memory based FT5406"); +MODULE_LICENSE("GPL"); -diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 30fb37fe175df604a738258a2a632bca3bfff33f..4a3d79d3b48eb483a4e4bf498f617515e3ad158f 100644 ---- a/include/soc/bcm2835/raspberrypi-firmware.h -+++ b/include/soc/bcm2835/raspberrypi-firmware.h -@@ -115,6 +115,7 @@ enum rpi_firmware_property_tag { - RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_OFFSET = 0x00048009, - RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN = 0x0004800a, - RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE = 0x0004800b, -+ RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF = 0x0004801f, - RPI_FIRMWARE_FRAMEBUFFER_SET_VSYNC = 0x0004800e, - RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, - -From 1f7afa0b1c9568b5af8499f7beab1fe3f5f7eb13 Mon Sep 17 00:00:00 2001 +From 3c2ed6c46544685d43ca58dab17c19ea903485b0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 28 Nov 2016 16:50:04 +0000 -Subject: [PATCH 061/170] Improve __copy_to_user and __copy_from_user +Subject: [PATCH 060/150] Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use @@ -98030,10 +98259,10 @@ index 971bc298f63eeeed418131b7b7200ac91b0d73f1..78e9f6e8c6fdebdb754cb703095d1726 bool "Broadcom BCM63xx DSL SoC" depends on ARCH_MULTI_V7 -From f3adca57f4687f00b7f94e55619a24ecd1b7973f Mon Sep 17 00:00:00 2001 +From 57a40c04b96521d6ff87a9447747205e19c89964 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 25 Jun 2015 12:16:11 +0100 -Subject: [PATCH 062/170] gpio-poweroff: Allow it to work on Raspberry Pi +Subject: [PATCH 061/150] 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 @@ -98068,10 +98297,10 @@ index be3d81ff51cc3f510d85e4eed7a52960e51e7bc1..a030ae9fb1fca325061c093696e82186 "%s: pm_power_off function already registered", __func__); -From eaac9ff830f2ae28422547a25099a3be36882d7e Mon Sep 17 00:00:00 2001 +From 616a13de2876122ecb63d590f43b3286ef2ba1ed Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Jul 2015 14:32:47 +0100 -Subject: [PATCH 063/170] mfd: Add Raspberry Pi Sense HAT core driver +Subject: [PATCH 062/150] mfd: Add Raspberry Pi Sense HAT core driver --- drivers/input/joystick/Kconfig | 8 + @@ -98936,10 +99165,10 @@ index 0000000000000000000000000000000000000000..56196dc2af10e464a1e3f98b028dca1c + +#endif -From b99fb970f0c2fb670bff4e6292a656005046fa92 Mon Sep 17 00:00:00 2001 +From 6cbb48af13feb9b2aba7fc9345f75604d2599020 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 064/170] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 063/150] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -99114,10 +99343,10 @@ index 0000000000000000000000000000000000000000..ee9f133953544629282631e5ef3f73fe +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); -From 8980525b90307e6bf6f7163ef8c880ab13f39af2 Mon Sep 17 00:00:00 2001 +From ad3343c8126a2bdcf5ecc74364d60864227c2050 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 25 Jan 2016 15:48:59 +0000 -Subject: [PATCH 065/170] ASoC: Add support for Rpi-DAC +Subject: [PATCH 064/150] ASoC: Add support for Rpi-DAC --- sound/soc/bcm/Kconfig | 7 +++ @@ -99401,10 +99630,10 @@ index 0000000000000000000000000000000000000000..afe1b419582aa40c4b2729d242bb13cd +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); -From cc86d88e632a09726e9c674321f1681c57c6748e Mon Sep 17 00:00:00 2001 +From 86c71d07b34665c1228abceaafee87c6a0529061 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 066/170] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 065/150] 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 @@ -99453,10 +99682,10 @@ index fc69b87443d80489382b97332de6d5ad12a58ec8..d8fdce81b297dcf02e144bdead0c6193 .component_driver = { .dapm_widgets = wm8804_dapm_widgets, -From f1a3d755de848fd23b3ff3f63adf10e128866d35 Mon Sep 17 00:00:00 2001 +From e78eb58f05cb4c4f4dda46617be1ea1e92a17455 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 067/170] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 066/150] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -99800,10 +100029,10 @@ index 0000000000000000000000000000000000000000..7620dd02de40b6d644ff038b445d375d +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); -From fac7693db08cec6c67e5ebc4755b4cf3472218ee Mon Sep 17 00:00:00 2001 +From 0bc00750ca5ba9b874f2a134829bf3f491ae5cb4 Mon Sep 17 00:00:00 2001 From: Gordon Garrity Date: Sat, 8 Mar 2014 16:56:57 +0000 -Subject: [PATCH 068/170] Add IQaudIO Sound Card support for Raspberry Pi +Subject: [PATCH 067/150] Add IQaudIO Sound Card support for Raspberry Pi Set a limit of 0dB on Digital Volume Control @@ -100138,10 +100367,10 @@ index 0000000000000000000000000000000000000000..1ee4097c846376666775272ed692ca33 +MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); +MODULE_LICENSE("GPL v2"); -From 0bbdd9e9a76b674e67bd4714e9277947f4af15ae Mon Sep 17 00:00:00 2001 +From abf5e903c6cde442acbc38ed875b63466fead9d9 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 10:06:56 +0200 -Subject: [PATCH 069/170] Added support for HiFiBerry DAC+ +Subject: [PATCH 068/150] 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. @@ -100166,14 +100395,18 @@ Add 'slave' param to use HiFiBerry DAC+ Pro in slave mode, with Pi as master for bit and frame clock. Signed-off-by: DigitalDreamtime + +Fixed a bug when using 352.8kHz sample rate + +Signed-off-by: Daniel Matuschek --- drivers/clk/Makefile | 1 + drivers/clk/clk-hifiberry-dacpro.c | 160 +++++++++++++++++ sound/soc/bcm/Kconfig | 7 + sound/soc/bcm/Makefile | 2 + - sound/soc/bcm/hifiberry_dacplus.c | 359 +++++++++++++++++++++++++++++++++++++ + sound/soc/bcm/hifiberry_dacplus.c | 360 +++++++++++++++++++++++++++++++++++++ sound/soc/codecs/pcm512x.c | 3 +- - 6 files changed, 531 insertions(+), 1 deletion(-) + 6 files changed, 532 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/clk-hifiberry-dacpro.c create mode 100644 sound/soc/bcm/hifiberry_dacplus.c @@ -100393,10 +100626,10 @@ index fcac518ca9b46ab2074fc859b8d2f1ff850ebc19..203afc03167acbcad15e836209956bc5 obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c new file mode 100644 -index 0000000000000000000000000000000000000000..b7b401cbe2b0d510d8b12d2dda6d5ff1fff42eb0 +index 0000000000000000000000000000000000000000..16697dd6c6db6856022731a07a9a1653dd94b9f5 --- /dev/null +++ b/sound/soc/bcm/hifiberry_dacplus.c -@@ -0,0 +1,359 @@ +@@ -0,0 +1,360 @@ +/* + * ASoC Driver for HiFiBerry DAC+ / DAC Pro + * @@ -100516,6 +100749,7 @@ index 0000000000000000000000000000000000000000..b7b401cbe2b0d510d8b12d2dda6d5ff1 + case 44100: + case 88200: + case 176400: ++ case 352800: + type = HIFIBERRY_DACPRO_CLK44EN; + break; + default: @@ -100771,10 +101005,10 @@ index 68feae262476492ae3a0b30855dbb09e96fa187e..f7b0977017ed5a6c02eafa0147d49d66 dev_err(dev, "No LRCLK?\n"); return -EINVAL; -From 073d77c6db28870fcc41aebd8d73a908cb43250e Mon Sep 17 00:00:00 2001 +From de70d35d8ba0d2b50924fd1363474c5d086994c7 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Mon, 4 Aug 2014 11:09:58 +0200 -Subject: [PATCH 070/170] Added driver for HiFiBerry Amp amplifier add-on board +Subject: [PATCH 069/150] 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. @@ -101609,10 +101843,10 @@ index 0000000000000000000000000000000000000000..8f019e04898754d2f87e9630137be9e8 + +#endif /* _TAS5713_H */ -From 2d1e45f7a28b8d849bdae96cf37982cf5a6038a1 Mon Sep 17 00:00:00 2001 +From 89f62cc4e8ee4852bab83a3065103dbb10f0ad1c Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 25 Mar 2015 09:26:17 +0100 -Subject: [PATCH 071/170] Add driver for rpi-proto +Subject: [PATCH 070/150] 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 @@ -101827,10 +102061,10 @@ index 0000000000000000000000000000000000000000..fadbfade100228aaafabb0d3bdf35c01 +MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)"); +MODULE_LICENSE("GPL"); -From 250e0a27ffc909eebbbcc61318f291217369a225 Mon Sep 17 00:00:00 2001 +From 997e4a57c1edba111b4a72beef5dd242ceff09ed Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 24 Aug 2015 16:03:47 +0100 -Subject: [PATCH 072/170] RaspiDAC3 support +Subject: [PATCH 071/150] RaspiDAC3 support Signed-off-by: Jan Grulich @@ -102073,10 +102307,10 @@ index 0000000000000000000000000000000000000000..ad2b5b89bc8213dc2e277306ef50d6e3 +MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); +MODULE_LICENSE("GPL v2"); -From 564c3f8d9dfe4224ab0bc706adfde7ac4ea0ba18 Mon Sep 17 00:00:00 2001 +From 336ddf15db17af67f37fa2e63422f07b18cc4b76 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Thu, 7 Apr 2016 21:26:21 +0100 -Subject: [PATCH 073/170] Add Support for JustBoom Audio boards +Subject: [PATCH 072/150] Add Support for JustBoom Audio boards justboom-dac: Adjust for ALSA API change @@ -102532,10 +102766,10 @@ index 0000000000000000000000000000000000000000..909cf8928f2f4313982316f9c5b8a709 +MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card"); +MODULE_LICENSE("GPL v2"); -From 1b838adf825dd6f7426eee6516af2ab58a669738 Mon Sep 17 00:00:00 2001 +From a0dac89e420629804db6baf5dbd1c4f0d982c4a3 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Tue, 3 May 2016 22:10:59 -0400 -Subject: [PATCH 074/170] ARM: adau1977-adc: Add basic machine driver for +Subject: [PATCH 073/150] ARM: adau1977-adc: Add basic machine driver for adau1977 codec driver. This commit adds basic support for the codec usage including: Device tree overlay, @@ -102717,10 +102951,10 @@ index 0000000000000000000000000000000000000000..f3d7e5db7bb912e1d7ca6f8e8d42df5f +MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC"); +MODULE_LICENSE("GPL v2"); -From 3e978c549e4016401fbb075f5badd6f22ec62990 Mon Sep 17 00:00:00 2001 +From 840712539de56c1eb27a4c4e18df269d90dd1aa6 Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Mon, 16 May 2016 21:36:31 +1000 -Subject: [PATCH 075/170] New AudioInjector.net Pi soundcard with low jitter +Subject: [PATCH 074/150] 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. @@ -102971,10 +103205,10 @@ index 0000000000000000000000000000000000000000..491906bbf446826e55dd843f28e4860f +MODULE_ALIAS("platform:audioinjector-pi-soundcard"); + -From edea7065381291662fd84b51ebf91c313233adad Mon Sep 17 00:00:00 2001 +From fe295d182feaef4d3bda40397fae253acebd034a Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Thu, 30 Jun 2016 18:38:42 +0100 -Subject: [PATCH 076/170] Add IQAudIO Digi WM8804 board support +Subject: [PATCH 075/150] Add IQAudIO Digi WM8804 board support Support IQAudIO Digi board with iqaudio_digi machine driver and iqaudio-digi-wm8804-audio overlay. @@ -103274,10 +103508,10 @@ index 0000000000000000000000000000000000000000..33aa2be8a43a12a12cfb5d844dd9732c +MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi"); +MODULE_LICENSE("GPL v2"); -From 10ee562dbfc0826d66435fe65849a78f3de4e4fb Mon Sep 17 00:00:00 2001 +From 17ae43fe90d0ebdbe11977b28a4766226646d949 Mon Sep 17 00:00:00 2001 From: escalator2015 Date: Tue, 24 May 2016 16:20:09 +0100 -Subject: [PATCH 077/170] New driver for RRA DigiDAC1 soundcard using WM8741 + +Subject: [PATCH 076/150] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804 --- @@ -103750,10 +103984,10 @@ index 0000000000000000000000000000000000000000..f200688bb4ae32b90a0ced555aed94b0 +MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1"); +MODULE_LICENSE("GPL v2"); -From b022b4d6608b9aa8fd12484e8de2877807fabb45 Mon Sep 17 00:00:00 2001 +From 473b602337b818b7b1508b552c8ea21199aea2cb Mon Sep 17 00:00:00 2001 From: DigitalDreamtime Date: Sat, 2 Jul 2016 16:26:19 +0100 -Subject: [PATCH 078/170] Add support for Dion Audio LOCO DAC-AMP HAT +Subject: [PATCH 077/150] Add support for Dion Audio LOCO DAC-AMP HAT Using dedicated machine driver and pcm5102a codec driver. @@ -103926,10 +104160,10 @@ index 0000000000000000000000000000000000000000..65e03741d349a2dc5bd91f69855ea952 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO"); +MODULE_LICENSE("GPL v2"); -From a94b17297aea85a8142b26254ce8170b8b09162a Mon Sep 17 00:00:00 2001 +From 356bfbeae804489a1d8203296e9bf0657804d477 Mon Sep 17 00:00:00 2001 From: Clive Messer Date: Mon, 19 Sep 2016 14:01:04 +0100 -Subject: [PATCH 079/170] Allo Piano DAC boards: Initial 2 channel (stereo) +Subject: [PATCH 078/150] 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, @@ -104136,10 +104370,10 @@ index 0000000000000000000000000000000000000000..eaf50fb6dbca1970ae1c6f8662088b0f +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC"); +MODULE_LICENSE("GPL v2"); -From 772abe13be42781343989834513c787d9db44af2 Mon Sep 17 00:00:00 2001 +From a692292384ce8a0514514b80e07dcd4240a32c93 Mon Sep 17 00:00:00 2001 From: Raashid Muhammed Date: Mon, 27 Mar 2017 12:35:00 +0530 -Subject: [PATCH 080/170] Add support for Allo Piano DAC 2.1 plus add-on board +Subject: [PATCH 079/150] 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. @@ -104157,11 +104391,21 @@ Reviewed-by: Vijay Kumar B. Reviewed-by: Raashid Muhammed PianoPlus: Dual Mono & Dual Stereo features added (#2069) + +allo-piano-dac-plus: Master volume added + fixes + +Master volume added, which controls both DACs volumes. + +See: https://github.com/raspberrypi/linux/pull/2149 + +Also fix initial max volume, default mode value, and unmute. + +Signed-off-by: allocom --- - sound/soc/bcm/Kconfig | 7 + - sound/soc/bcm/Makefile | 2 + - sound/soc/bcm/allo-piano-dac-plus.c | 805 ++++++++++++++++++++++++++++++++++++ - 3 files changed, 814 insertions(+) + sound/soc/bcm/Kconfig | 7 + + sound/soc/bcm/Makefile | 2 + + sound/soc/bcm/allo-piano-dac-plus.c | 1014 +++++++++++++++++++++++++++++++++++ + 3 files changed, 1023 insertions(+) create mode 100644 sound/soc/bcm/allo-piano-dac-plus.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig @@ -104198,10 +104442,10 @@ index 64f007f8ba38276a42e0bd8db92544db9412544b..023b2c17098b4e64bb188a598f0b4923 +obj-$(CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS) += snd-soc-allo-piano-dac-plus.o diff --git a/sound/soc/bcm/allo-piano-dac-plus.c b/sound/soc/bcm/allo-piano-dac-plus.c new file mode 100644 -index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e7657358d49 +index 0000000000000000000000000000000000000000..1800f5e4d414e2d83a9487a89a2800a3e1ec01b1 --- /dev/null +++ b/sound/soc/bcm/allo-piano-dac-plus.c -@@ -0,0 +1,805 @@ +@@ -0,0 +1,1014 @@ +/* + * ALSA ASoC Machine Driver for Allo Piano DAC Plus Subwoofer + * @@ -104232,6 +104476,13 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 +#include +#include "../codecs/pcm512x.h" + ++#define P_DAC_LEFT_MUTE 0x10 ++#define P_DAC_RIGHT_MUTE 0x01 ++#define P_DAC_MUTE 0x11 ++#define P_DAC_UNMUTE 0x00 ++#define P_MUTE 1 ++#define P_UNMUTE 0 ++ +struct dsp_code { + char i2c_addr; + char offset; @@ -104315,7 +104566,7 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + rate = 192000; + + if (lowpass > 14) -+ glb_ptr->set_lowpass = lowpass = 3; ++ glb_ptr->set_lowpass = lowpass = 0; + + if (mode > 3) + glb_ptr->set_mode = mode = 0; @@ -104333,16 +104584,20 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + 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); ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_MUTE, P_DAC_UNMUTE); ++ snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_MUTE, P_DAC_MUTE); + glb_ptr->set_rate = rate; + glb_ptr->set_mode = mode; + glb_ptr->set_lowpass = lowpass; + return 1; + + default: -+ snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); -+ snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x00); ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_MUTE, P_DAC_UNMUTE); ++ snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_MUTE, P_DAC_UNMUTE); + } + + for (dac = 0; dac < rtd->num_codecs; dac++) { @@ -104377,8 +104632,8 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + if (dsp_code_read->offset == 0) { + glb_ptr->dsp_page_number = dsp_code_read->val; + ret = snd_soc_write(rtd->codec_dais[dac]->codec, -+ PCM512x_PAGE_BASE(0), -+ dsp_code_read->val); ++ PCM512x_PAGE_BASE(0), ++ dsp_code_read->val); + + } else if (dsp_code_read->offset != 0) { + ret = snd_soc_write(rtd->codec_dais[dac]->codec, @@ -104415,8 +104670,8 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + + mutex_lock(&glb_ptr->lock); + -+ ret = __snd_allo_piano_dsp_program(rtd, -+ mode, rate, lowpass); ++ ret = __snd_allo_piano_dsp_program(rtd, mode, rate, lowpass); ++ + mutex_unlock(&glb_ptr->lock); + + return ret; @@ -104442,28 +104697,32 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + struct snd_card *snd_card_ptr = card->snd_card; + struct snd_kcontrol *kctl; + struct soc_mixer_control *mc; -+ unsigned int left_val = 0; ++ unsigned int left_val = 0, right_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) { ++ } else { + if (glb_ptr->set_mode <= 0) { + glb_ptr->dual_mode = 1; + glb_ptr->set_mode = 0; ++ } else { ++ glb_ptr->dual_mode = 0; ++ return 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); ++ if (glb_ptr->dual_mode == 1) { // Dual Mono ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_MUTE, P_DAC_RIGHT_MUTE); ++ snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_MUTE, P_DAC_LEFT_MUTE); + snd_soc_write(rtd->codec_dais[0]->codec, + PCM512x_DIGITAL_VOLUME_3, 0xff); ++ snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_DIGITAL_VOLUME_2, 0xff); + + list_for_each_entry(kctl, &snd_card_ptr->controls, list) { + if (!strncmp(kctl->id.name, "Digital Playback Volume", @@ -104477,6 +104736,9 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + } else { + left_val = snd_soc_read(rtd->codec_dais[0]->codec, + PCM512x_DIGITAL_VOLUME_2); ++ right_val = snd_soc_read(rtd->codec_dais[1]->codec, ++ PCM512x_DIGITAL_VOLUME_3); ++ + list_for_each_entry(kctl, &snd_card_ptr->controls, list) { + if (!strncmp(kctl->id.name, "Digital Playback Volume", + sizeof(kctl->id.name))) { @@ -104489,8 +104751,12 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + + 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); ++ snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_DIGITAL_VOLUME_2, right_val); ++ snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_MUTE, P_DAC_UNMUTE); ++ snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_MUTE, P_DAC_UNMUTE); + } + + return 0; @@ -104515,7 +104781,7 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + struct snd_card *snd_card_ptr = card->snd_card; + struct snd_kcontrol *kctl; + struct soc_mixer_control *mc; -+ unsigned int left_val = 0; ++ unsigned int left_val = 0, right_val = 0; + + rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); + @@ -104523,6 +104789,9 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + (ucontrol->value.integer.value[0] > 0)) { + left_val = snd_soc_read(rtd->codec_dais[0]->codec, + PCM512x_DIGITAL_VOLUME_2); ++ right_val = snd_soc_read(rtd->codec_dais[1]->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))) { @@ -104534,6 +104803,8 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + } + snd_soc_write(rtd->codec_dais[0]->codec, + PCM512x_DIGITAL_VOLUME_3, left_val); ++ snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_DIGITAL_VOLUME_3, right_val); + } + + return(snd_allo_piano_dsp_program(rtd, @@ -104570,23 +104841,29 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; + struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct glb_pool *glb_ptr = card->drvdata; + struct snd_soc_pcm_runtime *rtd; + unsigned int left_val = 0; + unsigned int right_val = 0; + + rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -+ left_val = snd_soc_read(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_2); -+ if (left_val < 0) -+ return left_val; -+ + right_val = snd_soc_read(rtd->codec_dais[1]->codec, + PCM512x_DIGITAL_VOLUME_3); + if (right_val < 0) + return right_val; + ++ if (glb_ptr->dual_mode != 1) { ++ left_val = snd_soc_read(rtd->codec_dais[1]->codec, ++ PCM512x_DIGITAL_VOLUME_2); ++ if (left_val < 0) ++ return left_val; ++ ++ } else { ++ left_val = right_val; ++ } ++ + ucontrol->value.integer.value[0] = -+ (~(left_val >> mc->shift)) & mc->max; ++ (~(left_val >> mc->shift)) & mc->max; + ucontrol->value.integer.value[1] = + (~(right_val >> mc->shift)) & mc->max; + @@ -104599,16 +104876,27 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; + struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct glb_pool *glb_ptr = card->drvdata; + struct snd_soc_pcm_runtime *rtd; + unsigned int left_val = (ucontrol->value.integer.value[0] & mc->max); + unsigned int right_val = (ucontrol->value.integer.value[1] & mc->max); + int ret = 0; + + rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -+ ret = snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_2, (~left_val)); -+ if (ret < 0) -+ return ret; ++ if (glb_ptr->dual_mode != 1) { ++ ret = snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_DIGITAL_VOLUME_2, (~left_val)); ++ if (ret < 0) ++ return ret; ++ } ++ ++ if (digital_gain_0db_limit) { ++ ret = snd_soc_limit_volume(card, "Subwoofer Playback Volume", ++ 207); ++ if (ret < 0) ++ dev_warn(card->dev, "Failed to set volume limit: %d\n", ++ ret); ++ } + + ret = snd_soc_write(rtd->codec_dais[1]->codec, + PCM512x_DIGITAL_VOLUME_3, (~right_val)); @@ -104630,8 +104918,10 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + if (val < 0) + return val; + -+ ucontrol->value.integer.value[0] = (val & 0x10) ? 0 : 1; -+ ucontrol->value.integer.value[1] = (val & 0x01) ? 0 : 1; ++ ucontrol->value.integer.value[0] = ++ (val & P_DAC_LEFT_MUTE) ? P_UNMUTE : P_MUTE; ++ ucontrol->value.integer.value[1] = ++ (val & P_DAC_RIGHT_MUTE) ? P_UNMUTE : P_MUTE; + + return val; +} @@ -104641,21 +104931,177 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 +{ + struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); + struct snd_soc_pcm_runtime *rtd; ++ struct glb_pool *glb_ptr = card->drvdata; + unsigned int left_val = (ucontrol->value.integer.value[0]); + unsigned int right_val = (ucontrol->value.integer.value[1]); + int ret = 0; + + rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -+ ret = snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, -+ ~((left_val & 0x01)<<4 | (right_val & 0x01))); -+ if (ret < 0) -+ return ret; -+ ++ if (glb_ptr->set_mode != 1) { ++ ret = snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, ++ ~((left_val & 0x01)<<4 | (right_val & 0x01))); ++ if (ret < 0) ++ return ret; ++ } + return 1; + +} + ++static int pcm512x_get_reg_master(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct soc_mixer_control *mc = ++ (struct soc_mixer_control *)kcontrol->private_value; ++ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct glb_pool *glb_ptr = card->drvdata; ++ struct snd_soc_pcm_runtime *rtd; ++ unsigned int left_val = 0, right_val = 0; ++ ++ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ ++ left_val = snd_soc_read(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_2); ++ if (left_val < 0) ++ return left_val; ++ ++ if (glb_ptr->dual_mode == 1) { ++ right_val = snd_soc_read(rtd->codec_dais[1]->codec, ++ PCM512x_DIGITAL_VOLUME_3); ++ if (right_val < 0) ++ return right_val; ++ } else { ++ right_val = snd_soc_read(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_3); ++ if (right_val < 0) ++ return right_val; ++ } ++ ++ ucontrol->value.integer.value[0] = ++ (~(left_val >> mc->shift)) & mc->max; ++ ucontrol->value.integer.value[1] = ++ (~(right_val >> mc->shift)) & mc->max; ++ ++ return 0; ++} ++ ++static int pcm512x_set_reg_master(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct soc_mixer_control *mc = ++ (struct soc_mixer_control *)kcontrol->private_value; ++ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct glb_pool *glb_ptr = card->drvdata; ++ struct snd_soc_pcm_runtime *rtd; ++ unsigned int left_val = (ucontrol->value.integer.value[0] & mc->max); ++ unsigned int right_val = (ucontrol->value.integer.value[1] & mc->max); ++ int ret = 0; ++ ++ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ ++ if (digital_gain_0db_limit) { ++ ret = snd_soc_limit_volume(card, "Master Playback Volume", ++ 207); ++ if (ret < 0) ++ dev_warn(card->dev, "Failed to set volume limit: %d\n", ++ ret); ++ } ++ ++ if (glb_ptr->dual_mode != 1) { ++ ret = snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_DIGITAL_VOLUME_2, (~left_val)); ++ if (ret < 0) ++ return ret; ++ ++ ret = snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_3, (~right_val)); ++ if (ret < 0) ++ return ret; ++ ++ } ++ ++ ret = snd_soc_write(rtd->codec_dais[1]->codec, ++ PCM512x_DIGITAL_VOLUME_3, (~right_val)); ++ if (ret < 0) ++ return ret; ++ ++ ret = snd_soc_write(rtd->codec_dais[0]->codec, ++ PCM512x_DIGITAL_VOLUME_2, (~left_val)); ++ if (ret < 0) ++ return ret; ++ return 1; ++} ++ ++static int pcm512x_get_reg_master_switch(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; ++ int val = 0; ++ ++ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ ++ val = snd_soc_read(rtd->codec_dais[0]->codec, PCM512x_MUTE); ++ if (val < 0) ++ return val; ++ ++ ucontrol->value.integer.value[0] = ++ (val & P_DAC_LEFT_MUTE) ? P_UNMUTE : P_MUTE; ++ ++ if (glb_ptr->dual_mode == 1) { ++ val = snd_soc_read(rtd->codec_dais[1]->codec, PCM512x_MUTE); ++ if (val < 0) ++ return val; ++ } ++ ucontrol->value.integer.value[1] = ++ (val & P_DAC_RIGHT_MUTE) ? P_UNMUTE : P_MUTE; ++ ++ return val; ++} ++ ++static int pcm512x_set_reg_master_switch(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); ++ struct snd_soc_pcm_runtime *rtd; ++ struct glb_pool *glb_ptr = card->drvdata; ++ unsigned int left_val = (ucontrol->value.integer.value[0]); ++ unsigned int right_val = (ucontrol->value.integer.value[1]); ++ int ret = 0; ++ ++ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); ++ if (glb_ptr->dual_mode == 1) { ++ ret = snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, ++ ~((left_val & 0x01)<<4)); ++ if (ret < 0) ++ return ret; ++ ret = snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, ++ ~((right_val & 0x01))); ++ if (ret < 0) ++ return ret; ++ ++ } else if (glb_ptr->set_mode == 1) { ++ ret = snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, ++ ~((left_val & 0x01)<<4 | (right_val & 0x01))); ++ if (ret < 0) ++ return ret; ++ ++ } else { ++ ret = snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, ++ ~((left_val & 0x01)<<4 | (right_val & 0x01))); ++ if (ret < 0) ++ return ret; ++ ++ ret = snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, ++ ~((left_val & 0x01)<<4 | (right_val & 0x01))); ++ if (ret < 0) ++ return ret; ++ } ++ return 1; ++} ++ +static const DECLARE_TLV_DB_SCALE(digital_tlv_sub, -10350, 50, 1); ++static const DECLARE_TLV_DB_SCALE(digital_tlv_master, -10350, 50, 1); + +static const struct snd_kcontrol_new allo_piano_controls[] = { + SOC_ENUM_EXT("Subwoofer mode Route", @@ -104685,6 +105131,20 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + PCM512x_RQMR_SHIFT, 1, 1, + pcm512x_get_reg_sub_switch, + pcm512x_set_reg_sub_switch), ++ ++ SOC_DOUBLE_R_EXT_TLV("Master Playback Volume", ++ PCM512x_DIGITAL_VOLUME_2, ++ PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, ++ pcm512x_get_reg_master, ++ pcm512x_set_reg_master, ++ digital_tlv_master), ++ ++ SOC_DOUBLE_EXT("Master Playback Switch", ++ PCM512x_MUTE, ++ PCM512x_RQML_SHIFT, ++ PCM512x_RQMR_SHIFT, 1, 1, ++ pcm512x_get_reg_master_switch, ++ pcm512x_set_reg_master_switch), +}; + +static int snd_allo_piano_dac_init(struct snd_soc_pcm_runtime *rtd) @@ -104698,6 +105158,8 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + + memset(glb_ptr, 0x00, sizeof(glb_ptr)); + card->drvdata = glb_ptr; ++ glb_ptr->dual_mode = 2; ++ glb_ptr->set_mode = 0; + + mutex_init(&glb_ptr->lock); + @@ -104710,26 +105172,25 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + dev_warn(card->dev, "Failed to set volume limit: %d\n", + ret); + } -+ + return 0; +} + +static void snd_allo_piano_gpio_mute(struct snd_soc_card *card) +{ + if (mute_gpio[0]) -+ gpiod_set_value_cansleep(mute_gpio[0], 1); ++ gpiod_set_value_cansleep(mute_gpio[0], P_MUTE); + + if (mute_gpio[1]) -+ gpiod_set_value_cansleep(mute_gpio[1], 1); ++ gpiod_set_value_cansleep(mute_gpio[1], P_MUTE); +} + +static void snd_allo_piano_gpio_unmute(struct snd_soc_card *card) +{ + if (mute_gpio[0]) -+ gpiod_set_value_cansleep(mute_gpio[0], 0); ++ gpiod_set_value_cansleep(mute_gpio[0], P_UNMUTE); + + if (mute_gpio[1]) -+ gpiod_set_value_cansleep(mute_gpio[1], 0); ++ gpiod_set_value_cansleep(mute_gpio[1], P_UNMUTE); +} + +static int snd_allo_piano_set_bias_level(struct snd_soc_card *card, @@ -104821,14 +105282,6 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 + } + } + -+ if (digital_gain_0db_limit) { -+ ret = snd_soc_limit_volume(card, -+ "Subwoofer Playback Volume", 207); -+ if (ret < 0) -+ 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) @@ -105008,10 +105461,10 @@ index 0000000000000000000000000000000000000000..d4e99e3c6a383d92fb0cf9e8c1cd1e76 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Piano DAC Plus"); +MODULE_LICENSE("GPL v2"); -From c1cfb437d88547600f13af72e3f43ac215cdec99 Mon Sep 17 00:00:00 2001 +From a7af0efd0891ba34876433069712600686bbab5e Mon Sep 17 00:00:00 2001 From: BabuSubashChandar Date: Tue, 28 Mar 2017 20:04:42 +0530 -Subject: [PATCH 081/170] Add support for Allo Boss DAC add-on board for +Subject: [PATCH 080/150] Add support for Allo Boss DAC add-on board for Raspberry Pi. (#1924) Signed-off-by: Baswaraj K @@ -105714,10 +106167,10 @@ index 0000000000000000000000000000000000000000..203ab76c7045b081578e23bda1099dd1 +MODULE_DESCRIPTION("ALSA ASoC Machine Driver for Allo Boss DAC"); +MODULE_LICENSE("GPL v2"); -From d0ab0a035f29d77133561b880e01f766a51b030c Mon Sep 17 00:00:00 2001 +From 87a85a74d3f76855bd1d545480ace4adb9d9cbbd Mon Sep 17 00:00:00 2001 From: gtrainavicius Date: Sun, 23 Oct 2016 12:06:53 +0300 -Subject: [PATCH 082/170] Support for Blokas Labs pisound board +Subject: [PATCH 081/150] Support for Blokas Labs pisound board Pisound dynamic overlay (#1760) @@ -106916,10 +107369,10 @@ index 0000000000000000000000000000000000000000..06ff1e53dc9d860946965b6303577762 +MODULE_DESCRIPTION("ASoC Driver for pisound, http://blokas.io/pisound"); +MODULE_LICENSE("GPL v2"); -From b43b807e297f1efa44ae987c947d77b52644bb32 Mon Sep 17 00:00:00 2001 +From ce1b3c9437bfee7773c8f4e6e582ae385ac76bda Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 22 Jan 2017 12:49:37 +0100 -Subject: [PATCH 083/170] ASoC: Add driver for Cirrus Logic Audio Card +Subject: [PATCH 082/150] 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 @@ -107984,10 +108437,10 @@ index 0000000000000000000000000000000000000000..ac8651ddff7bd3701dffe22c7fb88352 +MODULE_DESCRIPTION("ASoC driver for Cirrus Logic Audio Card"); +MODULE_LICENSE("GPL"); -From d7081b3e4203c5bbb8e8102cf822246c87e4359c Mon Sep 17 00:00:00 2001 +From 871d89b758e38faf50e1938fd8527bbf96c16fc3 Mon Sep 17 00:00:00 2001 From: Miquel Date: Fri, 24 Feb 2017 20:51:06 +0100 -Subject: [PATCH 084/170] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT +Subject: [PATCH 083/150] sound: Support for Dion Audio LOCO-V2 DAC-AMP HAT Signed-off-by: Miquel Blauw --- @@ -108182,10 +108635,10 @@ index 0000000000000000000000000000000000000000..a009c49477972a9832175d86f201b035 +MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO-V2"); +MODULE_LICENSE("GPL v2"); -From 25860b354ff744c3e03c7627ce8f828f58304729 Mon Sep 17 00:00:00 2001 +From 8344fd3e93560eade0b0a407271b419437bcd73d Mon Sep 17 00:00:00 2001 From: Fe-Pi Date: Wed, 1 Mar 2017 04:42:43 -0700 -Subject: [PATCH 085/170] Add support for Fe-Pi audio sound card. (#1867) +Subject: [PATCH 084/150] 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. @@ -108399,10 +108852,10 @@ index 0000000000000000000000000000000000000000..015b56fd73cc36be5b5eecd17548fd03 +MODULE_DESCRIPTION("ASoC Driver for Fe-Pi Audio"); +MODULE_LICENSE("GPL v2"); -From 1c8c65a1b787945aca2ad434396c5cc5142dc6ff Mon Sep 17 00:00:00 2001 +From a6bdaf46b0d8a177328d6706846c77a3cc49d02b Mon Sep 17 00:00:00 2001 From: Matt Flax Date: Wed, 8 Mar 2017 20:04:13 +1100 -Subject: [PATCH 086/170] Add support for the AudioInjector.net Octo sound card +Subject: [PATCH 085/150] Add support for the AudioInjector.net Octo sound card AudioInjector Octo: sample rates, regulators, reset @@ -108811,10 +109264,10 @@ index 0000000000000000000000000000000000000000..5e79f4eff93a21ed3495c77a90f73525 +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:audioinjector-octo-soundcard"); -From b49b9f5e040838027e16e730d249a1235c305353 Mon Sep 17 00:00:00 2001 +From bed5ced5d21fe2c59caf1f5a499609c1d04d2c79 Mon Sep 17 00:00:00 2001 From: Peter Malkin Date: Mon, 27 Mar 2017 16:38:21 -0700 -Subject: [PATCH 087/170] Driver support for Google voiceHAT soundcard. +Subject: [PATCH 086/150] Driver support for Google voiceHAT soundcard. --- sound/soc/bcm/Kconfig | 7 ++ @@ -109205,17 +109658,21 @@ index 0000000000000000000000000000000000000000..225854b8e5298b3c3018f59a49404354 +MODULE_DESCRIPTION("ASoC Driver for Google voiceHAT SoundCard"); +MODULE_LICENSE("GPL v2"); -From 84d701721aa610b3467bc6bc9e9fbceee21630fb Mon Sep 17 00:00:00 2001 +From 379618a22a229347ddcca0f7602ac054967eaea9 Mon Sep 17 00:00:00 2001 From: sandeepal Date: Fri, 2 Jun 2017 18:59:46 +0530 -Subject: [PATCH 088/170] Allo Digione Driver (#2048) +Subject: [PATCH 087/150] Allo Digione Driver (#2048) Driver for the Allo Digione soundcard + +allo-digione: 192kHz clicking sound fix + +See: https://github.com/raspberrypi/linux/pull/2149 --- sound/soc/bcm/Kconfig | 7 ++ sound/soc/bcm/Makefile | 2 + - sound/soc/bcm/allo-digione.c | 268 +++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 277 insertions(+) + sound/soc/bcm/allo-digione.c | 265 +++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 274 insertions(+) create mode 100644 sound/soc/bcm/allo-digione.c diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig @@ -109257,10 +109714,10 @@ index 72e1620fa4038035804cf3b2a09c6b12e7ae0fe1..53ea8229d7ac2065176983385dd7ba85 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 +index 0000000000000000000000000000000000000000..9387b055875fdf92a13dc4a9d2727f959dd0f2f9 --- /dev/null +++ b/sound/soc/bcm/allo-digione.c -@@ -0,0 +1,268 @@ +@@ -0,0 +1,265 @@ +/* + * ASoC Driver for Allo DigiOne + * @@ -109291,7 +109748,7 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a + +#include "../codecs/wm8804.h" + -+static short int auto_shutdown_output = 0; ++static short int auto_shutdown_output; +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"); @@ -109338,6 +109795,7 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a + /* 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; +} @@ -109349,6 +109807,7 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a + /* 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); + } +} @@ -109370,43 +109829,37 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a + 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; -+ } ++ mclk_freq = samplerate * 256; ++ mclk_div = WM8804_MCLKDIV_256FS; + + 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); ++ 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); @@ -109436,8 +109889,8 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a +/* 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, ++ .startup = snd_allo_digione_startup, ++ .shutdown = snd_allo_digione_shutdown, +}; + +static struct snd_soc_dai_link snd_allo_digione_dai[] = { @@ -109472,27 +109925,28 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a + 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); ++ struct device_node *i2s_node; ++ struct snd_soc_dai_link *dai = &snd_allo_digione_dai[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; -+ } ++ i2s_node = of_parse_phandle(pdev->dev.of_node, ++ "i2s-controller", 0); + -+ 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"); ++ 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_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"); ++ 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); @@ -109530,10 +109984,10 @@ index 0000000000000000000000000000000000000000..e3664e44c699d0102120ecf99e8b780a +MODULE_DESCRIPTION("ASoC Driver for Allo DigiOne"); +MODULE_LICENSE("GPL v2"); -From 12a609ec0bcca97e28e0460409f627c45103d713 Mon Sep 17 00:00:00 2001 +From af94db3b3f32b3d76826c714281e7712af3c0dd5 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 21 Oct 2015 14:55:21 +0100 -Subject: [PATCH 089/170] rpi_display: add backlight driver and overlay +Subject: [PATCH 088/150] 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 @@ -109702,19 +110156,18 @@ index 0000000000000000000000000000000000000000..14a0d9b037395497c1fdae2961feccd5 +MODULE_DESCRIPTION("Raspberry Pi mailbox based Backlight Driver"); +MODULE_LICENSE("GPL"); -From a1844499151aeed85537177bd21e684bfca1d369 Mon Sep 17 00:00:00 2001 +From 677b1332e0203d5a9a644980684286a9b7a7557b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 23 Feb 2016 19:56:04 +0000 -Subject: [PATCH 090/170] bcm2835-virtgpio: Virtual GPIO driver +Subject: [PATCH 089/150] bcm2835-virtgpio: Virtual GPIO driver Add a virtual GPIO driver that uses the firmware mailbox interface to request that the VPU toggles LEDs. --- - drivers/gpio/Kconfig | 6 + - drivers/gpio/Makefile | 1 + - drivers/gpio/gpio-bcm-virt.c | 214 +++++++++++++++++++++++++++++ - include/soc/bcm2835/raspberrypi-firmware.h | 1 + - 4 files changed, 222 insertions(+) + drivers/gpio/Kconfig | 6 ++ + drivers/gpio/Makefile | 1 + + drivers/gpio/gpio-bcm-virt.c | 214 +++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 221 insertions(+) create mode 100644 drivers/gpio/gpio-bcm-virt.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig @@ -109966,23 +110419,11 @@ index 0000000000000000000000000000000000000000..c3725546def9d4a6264fbb1f6b9814d0 +MODULE_AUTHOR("Dom Cobley "); +MODULE_DESCRIPTION("brcmvirt GPIO driver"); +MODULE_ALIAS("platform:brcmvirt-gpio"); -diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 4a3d79d3b48eb483a4e4bf498f617515e3ad158f..5f34e1257117fb48013c9926a8a223d64a598ab7 100644 ---- a/include/soc/bcm2835/raspberrypi-firmware.h -+++ b/include/soc/bcm2835/raspberrypi-firmware.h -@@ -116,6 +116,7 @@ enum rpi_firmware_property_tag { - RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN = 0x0004800a, - RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE = 0x0004800b, - RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF = 0x0004801f, -+ RPI_FIRMWARE_FRAMEBUFFER_SET_GPIOVIRTBUF = 0x00048020, - RPI_FIRMWARE_FRAMEBUFFER_SET_VSYNC = 0x0004800e, - RPI_FIRMWARE_FRAMEBUFFER_SET_BACKLIGHT = 0x0004800f, - -From 80945a055d6c2f58b52c5564ac9eae7592a18a87 Mon Sep 17 00:00:00 2001 +From d8e2fdfc579e00f3367177f825af2fff19a72b1b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 20 Feb 2017 17:01:21 +0000 -Subject: [PATCH 091/170] bcm2835-gpio-exp: Driver for GPIO expander via +Subject: [PATCH 090/150] bcm2835-gpio-exp: Driver for GPIO expander via mailbox service Pi3 and Compute Module 3 have a GPIO expander that the @@ -109994,11 +110435,10 @@ Pwr_led node added to device-tree for Pi3. Signed-off-by: Dave Stevenson --- - drivers/gpio/Kconfig | 7 + - drivers/gpio/Makefile | 1 + - drivers/gpio/gpio-bcm-exp.c | 254 +++++++++++++++++++++++++++++ - include/soc/bcm2835/raspberrypi-firmware.h | 4 + - 4 files changed, 266 insertions(+) + drivers/gpio/Kconfig | 7 ++ + drivers/gpio/Makefile | 1 + + drivers/gpio/gpio-bcm-exp.c | 254 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 262 insertions(+) create mode 100644 drivers/gpio/gpio-bcm-exp.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig @@ -110291,27 +110731,11 @@ index 0000000000000000000000000000000000000000..d68adafaee4ad406f45f4ff0d6b7c1ad +MODULE_AUTHOR("Dave Stevenson "); +MODULE_DESCRIPTION("brcm-exp GPIO driver"); +MODULE_ALIAS("platform:brcmexp-gpio"); -diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index 5f34e1257117fb48013c9926a8a223d64a598ab7..c819c21b0158a59c1308882e5a40e3f3fe73cbdf 100644 ---- a/include/soc/bcm2835/raspberrypi-firmware.h -+++ b/include/soc/bcm2835/raspberrypi-firmware.h -@@ -81,7 +81,11 @@ enum rpi_firmware_property_tag { - RPI_FIRMWARE_SET_TURBO = 0x00038009, - RPI_FIRMWARE_SET_CUSTOMER_OTP = 0x00038021, - RPI_FIRMWARE_SET_DOMAIN_STATE = 0x00038030, -+ RPI_FIRMWARE_GET_GPIO_STATE = 0x00030041, -+ RPI_FIRMWARE_SET_GPIO_STATE = 0x00038041, - RPI_FIRMWARE_SET_SDHOST_CLOCK = 0x00038042, -+ RPI_FIRMWARE_GET_GPIO_CONFIG = 0x00030043, -+ RPI_FIRMWARE_SET_GPIO_CONFIG = 0x00038043, - - /* Dispmanx TAGS */ - RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From 023ee49992e6367b416df094c895f2f6c2cc6670 Mon Sep 17 00:00:00 2001 +From 9d36f8520856a74eecb086f8fca6f4f4042730ae Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 23 Feb 2016 17:26:48 +0000 -Subject: [PATCH 092/170] amba_pl011: Don't use DT aliases for numbering +Subject: [PATCH 091/150] 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 @@ -110340,10 +110764,10 @@ index 111e6a95077978c2c30bfe2a2de4a0d095e8d76e..584471add0962c0e26eb814fc0ef43ee uap->old_cr = 0; uap->port.dev = dev; -From fcc85ad1bc7ab8c821a786ad6b35ab9b18e4df38 Mon Sep 17 00:00:00 2001 +From 2f440d0da7a22be0cb2b1eeab694e10f834a58d6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 1 Mar 2017 16:07:39 +0000 -Subject: [PATCH 093/170] amba_pl011: Round input clock up +Subject: [PATCH 092/150] 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 @@ -110429,10 +110853,10 @@ index 584471add0962c0e26eb814fc0ef43eea99b2d29..bfbc845d7be9ef804468d0a82da18d9b /* unregisters the driver also if no more ports are left */ static void pl011_unregister_port(struct uart_amba_port *uap) -From dbaff16583654f5a6b4126be1423cdf5af340b8d Mon Sep 17 00:00:00 2001 +From 42442767c9a260cb6f2a4cac96e228a7da68ee67 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 3 Dec 2014 13:23:28 +0200 -Subject: [PATCH 094/170] OF: DT-Overlay configfs interface +Subject: [PATCH 093/150] 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. @@ -110865,10 +111289,10 @@ index 0000000000000000000000000000000000000000..0037e6868a6cda8706c88194c6a4454b +} +late_initcall(of_cfs_init); -From 54cb522f4051210711e4e6df85a3386f2be93644 Mon Sep 17 00:00:00 2001 +From 1c8f7869da68ad83222c977cb331f6b67e186910 Mon Sep 17 00:00:00 2001 From: Cheong2K Date: Fri, 26 Feb 2016 18:20:10 +0800 -Subject: [PATCH 095/170] brcm: adds support for BCM43341 wifi +Subject: [PATCH 094/150] brcm: adds support for BCM43341 wifi brcmfmac: Disable power management @@ -111000,10 +111424,10 @@ index 613caca7dc020a78985b22521422700022c37473..971c68a261f2d041806655dd66636aee BRCMF_FW_NVRAM_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362), BRCMF_FW_NVRAM_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339), -From d35f96ae8d472a2f2378c7469406120ba1d8a4e2 Mon Sep 17 00:00:00 2001 +From 47d314b9b88bd20da80585373df42b1fe4a27138 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 17 Feb 2017 15:26:13 +0000 -Subject: [PATCH 096/170] brcmfmac: Mute expected startup 'errors' +Subject: [PATCH 095/150] brcmfmac: Mute expected startup 'errors' The brcmfmac WiFi driver always complains about the '00' country code. Modify the driver to ignore '00' silently. @@ -111027,10 +111451,10 @@ index 2d3b5e2a3ef7cd6186487b48665b401249380d18..e417454f5d6ec136cda29e65af5449f2 req->alpha2[0], req->alpha2[1]); return; -From 9f7b5dcbb711674492d97bc75a3cf5e7b07d3f9e Mon Sep 17 00:00:00 2001 +From 65c54a39b851c2ef39a2dfac66d01ad9111a511d Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 17 Dec 2015 13:37:07 +0000 -Subject: [PATCH 097/170] hci_h5: Don't send conf_req when ACTIVE +Subject: [PATCH 096/150] 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. @@ -111053,24 +111477,24 @@ index c0e4e26dc30d7c3c6a771b7b86df88c8cf763646..7308287259eedcaf229f8a496a0e3826 if (H5_HDR_LEN(hdr) > 2) h5->tx_win = (data[2] & 0x07); -From 9347775991e8fd9bdb781bef455791ecaef2141f Mon Sep 17 00:00:00 2001 +From aa1386e364672501431f75b2c8182fb0bfc1c788 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 13 Apr 2015 17:16:29 +0100 -Subject: [PATCH 098/170] config: Add default configs +Subject: [PATCH 097/150] config: Add default configs --- - arch/arm/configs/bcm2709_defconfig | 1338 +++++++++++++++++++++++++++++++++++ - arch/arm/configs/bcmrpi_defconfig | 1343 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 2681 insertions(+) + arch/arm/configs/bcm2709_defconfig | 1339 +++++++++++++++++++++++++++++++++++ + arch/arm/configs/bcmrpi_defconfig | 1344 ++++++++++++++++++++++++++++++++++++ + 2 files changed, 2683 insertions(+) create mode 100644 arch/arm/configs/bcm2709_defconfig create mode 100644 arch/arm/configs/bcmrpi_defconfig diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig new file mode 100644 -index 0000000000000000000000000000000000000000..10b6bba840c6576cae3ca6a048128bb74d93fc95 +index 0000000000000000000000000000000000000000..e3620ef6499eea5677677f1c44aba9c61fe81856 --- /dev/null +++ b/arch/arm/configs/bcm2709_defconfig -@@ -0,0 +1,1338 @@ +@@ -0,0 +1,1339 @@ +CONFIG_LOCALVERSION="-v7" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y @@ -111974,6 +112398,7 @@ index 0000000000000000000000000000000000000000..10b6bba840c6576cae3ca6a048128bb7 +CONFIG_HID_A4TECH=m +CONFIG_HID_ACRUX=m +CONFIG_HID_APPLE=m ++CONFIG_HID_ASUS=m +CONFIG_HID_BELKIN=m +CONFIG_HID_BETOP_FF=m +CONFIG_HID_CHERRY=m @@ -112411,10 +112836,10 @@ index 0000000000000000000000000000000000000000..10b6bba840c6576cae3ca6a048128bb7 +CONFIG_LIBCRC32C=y diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig new file mode 100644 -index 0000000000000000000000000000000000000000..58c9d7441672d703319101f0ca9dd21cb1c76a12 +index 0000000000000000000000000000000000000000..c1da808d40bc8e867b41d3566bd60a758d052bdb --- /dev/null +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -0,0 +1,1343 @@ +@@ -0,0 +1,1344 @@ +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y @@ -113311,6 +113736,7 @@ index 0000000000000000000000000000000000000000..58c9d7441672d703319101f0ca9dd21c +CONFIG_HID_A4TECH=m +CONFIG_HID_ACRUX=m +CONFIG_HID_APPLE=m ++CONFIG_HID_ASUS=m +CONFIG_HID_BELKIN=m +CONFIG_HID_BETOP_FF=m +CONFIG_HID_CHERRY=m @@ -113759,10 +114185,10 @@ index 0000000000000000000000000000000000000000..58c9d7441672d703319101f0ca9dd21c +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y -From 912abd19e429cfcd0c72bf790aea2fed735896a8 Mon Sep 17 00:00:00 2001 +From f2d0f05c0ae83346d5c7cd1ffd851428fde0c3cb Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Wed, 24 Aug 2016 03:35:56 -0700 -Subject: [PATCH 099/170] Add arm64 configuration and device tree differences. +Subject: [PATCH 098/150] Add arm64 configuration and device tree differences. Disable MMC_BCM2835_SDHOST and MMC_BCM2835 since these drivers are crashing at the moment. @@ -115176,10 +115602,10 @@ index 0000000000000000000000000000000000000000..e6b09fafa27eed2b762e3d53b55041f7 +CONFIG_LIBCRC32C=y +CONFIG_BCM2835_VCHIQ=n -From 724ed3bc8dce6cf24f456154424e08a8df80d21e Mon Sep 17 00:00:00 2001 +From 0740db7c14be6c8a6b217c43738331dbc8d0ba78 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Thu, 12 Jan 2017 07:07:08 -0800 -Subject: [PATCH 100/170] ARM64: Make it work again on 4.9 (#1790) +Subject: [PATCH 099/150] 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. @@ -115590,10 +116016,10 @@ index e6b09fafa27eed2b762e3d53b55041f793683d27..c7e891d72969a388d9b135a36dbfc9c9 CONFIG_LIBCRC32C=y -CONFIG_BCM2835_VCHIQ=n -From df5c802e7aed4b67ed7e28b785ed22a12ebb8ff0 Mon Sep 17 00:00:00 2001 +From 0df4610d763a8004d5eb20acb5c291f3496e9405 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:10:07 -0800 -Subject: [PATCH 101/170] ARM64: Enable HDMI audio and vc04_services in +Subject: [PATCH 100/150] ARM64: Enable HDMI audio and vc04_services in bcmrpi3_defconfig Signed-off-by: Michael Zoran @@ -115622,10 +116048,10 @@ index c7e891d72969a388d9b135a36dbfc9c9cb609bf8..4b90f9b64abe9f089ba56b13d5a00de3 CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set -From 30a9efa3a5edec931d29a9aeff7cc3bb19fb7c98 Mon Sep 17 00:00:00 2001 +From c2f701081fd62e093679740260428f1cd5248a8c Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Thu, 12 Jan 2017 19:14:03 -0800 -Subject: [PATCH 102/170] ARM64: Run bcmrpi3_defconfig through savedefconfig. +Subject: [PATCH 101/150] ARM64: Run bcmrpi3_defconfig through savedefconfig. Signed-off-by: Michael Zoran --- @@ -115670,10 +116096,10 @@ index 4b90f9b64abe9f089ba56b13d5a00de33343bfb9..dac962ca1634662ce7d966f1ffb53b5b CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m -From 9c93fc74c45513ebbe1804a5de7a1cdbdaa4d522 Mon Sep 17 00:00:00 2001 +From d005d1cb2c1974bf0fb46fa2f8a764ba50890b29 Mon Sep 17 00:00:00 2001 From: Electron752 Date: Sat, 14 Jan 2017 02:54:26 -0800 -Subject: [PATCH 103/170] ARM64: Enable Kernel Address Space Randomization +Subject: [PATCH 102/150] ARM64: Enable Kernel Address Space Randomization (#1792) Randomization allows the mapping between virtual addresses and physical @@ -115705,10 +116131,10 @@ index dac962ca1634662ce7d966f1ffb53b5bfa27c506..aae33b4b3c3e736ea7cd3ca242158ad6 CONFIG_BINFMT_MISC=y CONFIG_COMPAT=y -From 21f0f2bbd530bf2b34b79c4aadbcd46b794861d3 Mon Sep 17 00:00:00 2001 +From c100907ce1944562ee660ee543eb3798493a8ccd Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sun, 15 Jan 2017 07:31:59 -0800 -Subject: [PATCH 104/170] ARM64: Enable RTL8187/RTL8192CU wifi in build config +Subject: [PATCH 103/150] 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 @@ -115733,10 +116159,10 @@ index aae33b4b3c3e736ea7cd3ca242158ad6ba558aff..b7d762df19b85e369a32cd823dfd0621 CONFIG_ZD1211RW=m CONFIG_MAC80211_HWSIM=m -From f5cc84ea9a303a6bf2ddd37b7fcf69fb9b581533 Mon Sep 17 00:00:00 2001 +From 81ac65f8da3f9d1c2a7f1cdf5138e5fa36c95b9d Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:33:51 -0800 -Subject: [PATCH 105/170] ARM64/DWC_OTG: Port dwc_otg driver to ARM64 +Subject: [PATCH 104/150] 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 @@ -115877,7 +116303,7 @@ index 8340041ce65665c094e2ad49fd5e8eb1751506f3..ed088f34f210e9a337ab9b80fff0cf9e extern void fiq_fsm_spin_unlock(fiq_lock_t *lock); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 60464acab588a1e189f39b268ffc25766c13dc85..7710370b30363e3170bf9bf522597c5f41dfb908 100644 +index aeda94c01c18de508a2fe43bb0beef4970d40964..0c28a6e44299bffd42c501497b6fa02206c2b620 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -1000,6 +1000,10 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) @@ -115908,7 +116334,7 @@ index fb57db09378f4ab95d57cb58aa570a915ccb61c3..a384db5e7ac219936ace65e5616e68c8 /** * Returns private data set by diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index ed855eb9c3b64d54e93c5aa7e06212e779400dfd..c8f52709a7d24974c0a38dcf1708f91073e96b0e 100644 +index 082159b64b343f1da1660065da2d85ece79d9963..6947e98b87adb6a5002127215943ad1ac126a05f 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -36,8 +36,9 @@ @@ -116079,10 +116505,10 @@ index 6b2c7d0c93f36a63863ff4b0ecc1f3eab77e058b..d7b700ff17821ad1944e36721fe6b2db /** The OS page size */ #define DWC_OS_PAGE_SIZE PAGE_SIZE -From 7f712e909ee32cc028db50938eee9757034160a4 Mon Sep 17 00:00:00 2001 +From d2a208e4b7ec21d9a581eb5b9e99ef8e3ed36e79 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:43:57 -0800 -Subject: [PATCH 106/170] ARM64: Round-Robin dispatch IRQs between CPUs. +Subject: [PATCH 105/150] 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 @@ -116156,10 +116582,10 @@ index 86b357ae027bf8ba1ac32cd150a8cf21e36597e2..05b17ca993f405c4c8e61a782ec58149 .name = "bcm2836-gpu", .irq_mask = bcm2836_arm_irqchip_mask_gpu_irq, -From 21defa38709dc3e2de623622396f9b6cee78daa3 Mon Sep 17 00:00:00 2001 +From b9614b669f416188bc65f7387efed80a62ac945e Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 14 Jan 2017 21:45:03 -0800 -Subject: [PATCH 107/170] ARM64: Enable DWC_OTG Driver In ARM64 Build +Subject: [PATCH 106/150] ARM64: Enable DWC_OTG Driver In ARM64 Build Config(bcmrpi3_defconfig) Signed-off-by: Michael Zoran @@ -116180,10 +116606,10 @@ index b7d762df19b85e369a32cd823dfd062145bdefa7..4d85c231c5ea0244e1b05fb4a5e3c8fd CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_REALTEK=m -From a61e677629e98842f6bb65c897b5e7dc13beb2fb Mon Sep 17 00:00:00 2001 +From 221503f81ef05e1ae14540dd3350c6403ef346d5 Mon Sep 17 00:00:00 2001 From: Michael Zoran Date: Sat, 11 Feb 2017 01:18:31 -0800 -Subject: [PATCH 108/170] ARM64: Force hardware emulation of deprecated +Subject: [PATCH 107/150] ARM64: Force hardware emulation of deprecated instructions. --- @@ -116211,10 +116637,10 @@ index d06fbe4cd38d7423c900aff64b0e728f995478d3..877b7c90f9555203d5d55d739359a256 case INSN_OBSOLETE: insn->current_mode = INSN_UNDEF; -From 2d6f4b33864b82c17997f817b83e585eabf1338f Mon Sep 17 00:00:00 2001 +From a839d1efd5beec7ee4cf05b5612ac93fba45088f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 10 Feb 2017 17:57:08 -0800 -Subject: [PATCH 109/170] build/arm64: Add rules for .dtbo files for dts +Subject: [PATCH 108/150] build/arm64: Add rules for .dtbo files for dts overlays We now create overlays as .dtbo files. @@ -116225,10 +116651,10 @@ Signed-off-by: Khem Raj 1 file changed, 3 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile -index 939b310913cf38cd7ca3136128fb5440340d7d12..8d90800c10f96efa428f5ed348fe70471a5e89d7 100644 +index 3eb4397150df8cb3ce1d60c69f4efb727377ba23..ba7508b89589e618221df693d6cd876e42ef695d 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile -@@ -131,6 +131,9 @@ zinstall install: +@@ -128,6 +128,9 @@ zinstall install: %.dtb: scripts $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ @@ -116239,10 +116665,10 @@ index 939b310913cf38cd7ca3136128fb5440340d7d12..8d90800c10f96efa428f5ed348fe7047 dtbs: prepare scripts -From 54ef793985245ef5e12ad3ef29d4fa6811b76d7e Mon Sep 17 00:00:00 2001 +From d10eea6195d7db6b4fb762046baefde256f27f17 Mon Sep 17 00:00:00 2001 From: Bilal Amarni Date: Wed, 24 May 2017 10:52:50 +0200 -Subject: [PATCH 110/170] enable drivers for GPIO expander and vcio +Subject: [PATCH 109/150] enable drivers for GPIO expander and vcio --- arch/arm64/configs/bcmrpi3_defconfig | 3 +++ @@ -116270,10 +116696,10 @@ index 4d85c231c5ea0244e1b05fb4a5e3c8fd3e651ddf..9dcb58a519d041fadae99c81a7bda621 CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_STMPE=y -From 179656ef87d4f7dbbba9b6be67b01e335eaab291 Mon Sep 17 00:00:00 2001 +From 403451429820cbe3a073ffefe1d7988eb7bdb865 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 23 Mar 2017 16:34:46 +0000 -Subject: [PATCH 111/170] bcm2835-aux: Add aux interrupt controller +Subject: [PATCH 110/150] 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 @@ -116437,10 +116863,10 @@ index bd750cf2238d61489811e7d7bd3b5f9950ed53c8..41e0702fae4692221980b0d02aed1ba6 BCM2835_AUX_CLOCK_COUNT, GFP_KERNEL); if (!onecell) -From 2e40921f5a7de1991e48af67a87f10d05c2119e5 Mon Sep 17 00:00:00 2001 +From 344c9c21ee82d116e33dd247dbeb869eeb0b5063 Mon Sep 17 00:00:00 2001 From: Yasunari Takiguchi Date: Fri, 14 Apr 2017 10:43:57 +0100 -Subject: [PATCH 112/170] This is the driver for Sony CXD2880 DVB-T2/T tuner + +Subject: [PATCH 111/150] 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. @@ -132572,44 +132998,18 @@ index 0000000000000000000000000000000000000000..82e122349055be817eb74ed5bbcd7560 +MODULE_AUTHOR("Sony Semiconductor Solutions Corporation"); +MODULE_LICENSE("GPL v2"); -From f868ec09f9b8fe8776ecbf26569b8e5f0d21f848 Mon Sep 17 00:00:00 2001 -From: Eric Anholt -Date: Wed, 14 Sep 2016 09:18:09 +0100 -Subject: [PATCH 113/170] raspberrypi-firmware: Define the MBOX channel in the - header. - -Signed-off-by: Eric Anholt ---- - include/soc/bcm2835/raspberrypi-firmware.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index c819c21b0158a59c1308882e5a40e3f3fe73cbdf..de2a3dcd562beb752266eaf0070e55861d553f5f 100644 ---- a/include/soc/bcm2835/raspberrypi-firmware.h -+++ b/include/soc/bcm2835/raspberrypi-firmware.h -@@ -12,6 +12,8 @@ - #include - #include - -+#define RPI_FIRMWARE_CHAN_FB 1 -+ - struct rpi_firmware; - - enum rpi_firmware_property_status { - -From 31fba05635bbc5cb4114fbff9e48d61b961b50f8 Mon Sep 17 00:00:00 2001 +From 51632bb34c204cc0f2b1566f0aa8a1533c24c888 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 09:16:19 +0100 -Subject: [PATCH 114/170] raspberrypi-firmware: Export the general transaction +Subject: [PATCH 112/150] raspberrypi-firmware: Export the general transaction function. The vc4-firmware-kms module is going to be doing the MBOX FB call. Signed-off-by: Eric Anholt --- - drivers/firmware/raspberrypi.c | 3 ++- - include/soc/bcm2835/raspberrypi-firmware.h | 1 + - 2 files changed, 3 insertions(+), 1 deletion(-) + drivers/firmware/raspberrypi.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c index 3f070bd38a91511c986e3fb114b15bd4ac32634c..f261b64d1657c02290904d841e1f087c34e27ded 100644 @@ -132632,22 +133032,11 @@ index 3f070bd38a91511c986e3fb114b15bd4ac32634c..f261b64d1657c02290904d841e1f087c /** * rpi_firmware_property_list - Submit firmware property list -diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index de2a3dcd562beb752266eaf0070e55861d553f5f..dc7fd58afd5dddebf9b17065bb069a1db663362c 100644 ---- a/include/soc/bcm2835/raspberrypi-firmware.h -+++ b/include/soc/bcm2835/raspberrypi-firmware.h -@@ -156,5 +156,6 @@ static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware - return NULL; - } - #endif -+int rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data); - - #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -From e99e690a699b09194d3f12ff7177c97466ae6968 Mon Sep 17 00:00:00 2001 +From 06d29b5be83b26619c182a03c30e782a31e2599a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 14 Sep 2016 08:39:33 +0100 -Subject: [PATCH 115/170] drm/vc4: Add a mode for using the closed firmware for +Subject: [PATCH 113/150] drm/vc4: Add a mode for using the closed firmware for display. Signed-off-by: Eric Anholt @@ -133418,10 +133807,10 @@ index 0000000000000000000000000000000000000000..78c34305935501248b1ca548a1ee0175 + }, +}; -From e9569271477fafdfa1108a65dfb97b5fde7dedd5 Mon Sep 17 00:00:00 2001 +From 9a1b2b1bf331971697d02ac478f498cecf7aa46f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:09:18 -0800 -Subject: [PATCH 116/170] drm/vc4: Name the primary and cursor planes in fkms. +Subject: [PATCH 114/150] drm/vc4: Name the primary and cursor planes in fkms. This makes debugging nicer, compared to trying to remember what the IDs are. @@ -133445,10 +133834,10 @@ index 78c34305935501248b1ca548a1ee01753b8fa099..d9a5551d01a2155e3df1bbbd78a1ee2b if (type == DRM_PLANE_TYPE_PRIMARY) { vc4_plane->fbinfo = -From c47aa0d22a9572d4c5126567f19aeba226f525c8 Mon Sep 17 00:00:00 2001 +From 24f32ea253853f074ceab2bd26d14031aa695724 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Feb 2017 17:10:09 -0800 -Subject: [PATCH 117/170] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of +Subject: [PATCH 115/150] drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms. Trying to debug weston on fkms involved figuring out what calls I was @@ -133518,10 +133907,10 @@ index d9a5551d01a2155e3df1bbbd78a1ee2b961be946..e372666af0119b1876bad5167e6d0ff8 RPI_FIRMWARE_SET_CURSOR_STATE, &packet_state, -From b0e773afbcbe04fc7249d5d80ad593870cb6e781 Mon Sep 17 00:00:00 2001 +From 3bf335b891d2d61491ecc3e06f4f8143af4fa68f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Feb 2017 09:42:18 -0800 -Subject: [PATCH 118/170] drm/vc4: Fix sending of page flip completion events +Subject: [PATCH 116/150] 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 @@ -133563,10 +133952,10 @@ index e372666af0119b1876bad5167e6d0ff8945d1b80..4d7b7f218cbbc9e7abcaa37743978060 static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) -From 68055f701ac17f0b2bef8e1ffcd20b4cf1cd46cf Mon Sep 17 00:00:00 2001 +From 062891283f173de6823b13aa9652ab896b320a7b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Apr 2017 21:43:46 +0100 -Subject: [PATCH 119/170] vc4_fkms: Apply firmware overscan offset to hardware +Subject: [PATCH 117/150] vc4_fkms: Apply firmware overscan offset to hardware cursor --- @@ -133623,10 +134012,10 @@ index 4d7b7f218cbbc9e7abcaa37743978060b73fbdd1..d170775ccc985637ff018804f510a500 return 0; -From 62471395144bf122924ef14545d4684fd4ca7052 Mon Sep 17 00:00:00 2001 +From 30dc3f98b45062e07f0033569e51a19ba966b4fc Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 11:34:26 +0200 -Subject: [PATCH 120/170] ASoC: bcm2835: Add support for TDM modes +Subject: [PATCH 118/150] 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 @@ -134028,10 +134417,10 @@ index 56df7d8a43d0aac055a91b0d24aca8e1b4e308e4..dcacf7f83c9371df539a788ea33fedcf dev->dev = &pdev->dev; dev_set_drvdata(&pdev->dev, dev); -From a298617b956e454c30c4463a21621e37d5c305b3 Mon Sep 17 00:00:00 2001 +From 721076c7c697af01d6d1bc674929a988d66a2cfd Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 15:30:50 +0200 -Subject: [PATCH 121/170] ASoC: bcm2835: Support left/right justified and DSP +Subject: [PATCH 119/150] ASoC: bcm2835: Support left/right justified and DSP modes DSP modes and left/right justified modes can be supported @@ -134277,10 +134666,10 @@ index dcacf7f83c9371df539a788ea33fedcf97d64690..3a706fda4f39e42efbe12f19d87af9b1 } -From f0b94b8162aa266cf3b7bb4f158231449f335735 Mon Sep 17 00:00:00 2001 +From a7b9cd9dbc3afc79c7ac8ca67e7ed957c80a0bb3 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:19:54 +0200 -Subject: [PATCH 122/170] ASoC: bcm2835: Support additional samplerates up to +Subject: [PATCH 120/150] ASoC: bcm2835: Support additional samplerates up to 384kHz Sample rates are only restricted by the capabilities of the @@ -134323,10 +134712,10 @@ index 3a706fda4f39e42efbe12f19d87af9b100a348a5..43f5715a0d5dda851731ecf7ff27e76c | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE -From b950fb0080e840e93970d8f06d933d21862f74d3 Mon Sep 17 00:00:00 2001 +From c31edc1a046bde642372642b1adf547880c28301 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Sun, 7 May 2017 16:24:57 +0200 -Subject: [PATCH 123/170] ASoC: bcm2835: Enforce full symmetry +Subject: [PATCH 121/150] 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. @@ -134362,10 +134751,10 @@ index 43f5715a0d5dda851731ecf7ff27e76c48fb6e57..2e449d7173fcecbcd647f90a26bd58b6 static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg) -From 74ff6d4da1ec408c1409f2f92b1e2e19b4380c32 Mon Sep 17 00:00:00 2001 +From 4b620195999e6cb1b83a94d0fe908056d4242a24 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 5 Jun 2017 16:40:38 +0100 -Subject: [PATCH 124/170] dma-bcm2708: Fix module compilation of +Subject: [PATCH 122/150] dma-bcm2708: Fix module compilation of CONFIG_DMA_BCM2708 bcm2708-dmaengine.c defines functions like bcm_dma_start which are @@ -134408,10 +134797,10 @@ index c5bfff2765be4606077e6c8af73040ec13ee8974..6ca874d332a8bc666b1c9576ac51f479 #endif /* _PLAT_BCM2708_DMA_H */ -From 5617bff53aac93ad86b5a48cd7f2ca9fc9b99660 Mon Sep 17 00:00:00 2001 +From 16989b9f9348516c596338dae81b02067e32261b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 25 Aug 2017 19:18:13 +0100 -Subject: [PATCH 125/170] cache: export clean and invalidate +Subject: [PATCH 123/150] cache: export clean and invalidate --- arch/arm/mm/cache-v6.S | 4 ++-- @@ -134463,174 +134852,10 @@ index de78109d002db1a5e7c94a6c1bc8bb94161d07b8..4c850aa3af2b2439fced4e130441329a sub r3, r2, #1 bic r0, r0, r3 -From 3461aeb00f0ed41fb0d08500bbe97e7b275da987 Mon Sep 17 00:00:00 2001 -From: Matthias Reichl -Date: Wed, 20 Sep 2017 11:52:42 +0200 -Subject: [PATCH 126/170] overlays: add gpio-ir-tx and pwm-ir-tx - -Signed-off-by: Matthias Reichl ---- - arch/arm/boot/dts/overlays/Makefile | 2 ++ - arch/arm/boot/dts/overlays/README | 24 ++++++++++++++ - arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts | 34 +++++++++++++++++++ - arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts | 40 +++++++++++++++++++++++ - 4 files changed, 100 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts - create mode 100644 arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index c50b1dfa9d7334df47ce087f9d2a7a816afa05ba..df9ec4c40d2438837e0c34ad305bd46fe8f559e2 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -29,6 +29,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - goodix.dtbo \ - googlevoicehat-soundcard.dtbo \ - gpio-ir.dtbo \ -+ gpio-ir-tx.dtbo \ - gpio-poweroff.dtbo \ - gpio-shutdown.dtbo \ - hifiberry-amp.dtbo \ -@@ -78,6 +79,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - pps-gpio.dtbo \ - pwm.dtbo \ - pwm-2chan.dtbo \ -+ pwm-ir-tx.dtbo \ - qca7000.dtbo \ - raspidac3.dtbo \ - rotary-encoder.dtbo \ -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index e6d777a601c91d192bc5713f9a73e1a2d4d708ef..eafbf530acdab53c74656e409319c6dcaefbfd4e 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -495,6 +495,17 @@ Params: gpio_pin Input pin number. Default is 18. - ir-keytable), defaults to "rc-rc6-mce" - - -+Name: gpio-ir-tx -+Info: Use GPIO pin as bit-banged infrared transmitter output. -+ This is an alternative to "pwm-ir-tx". gpio-ir-tx doesn't require -+ a PWM so it can be used together with onboard analog audio. -+Load: dtoverlay=gpio-ir-tx,= -+Params: gpio_pin Output GPIO (default 18) -+ -+ invert "1" = invert the output (make it active-low). -+ Default is "0" (active-high). -+ -+ - Name: gpio-poweroff - Info: Drives a GPIO high or low on poweroff (including halt) - Load: dtoverlay=gpio-poweroff,= -@@ -1195,6 +1206,19 @@ Params: pin Output pin (default 18) - see table - clock PWM clock frequency (informational) - - -+Name: pwm-ir-tx -+Info: Use GPIO pin as pwm-assisted infrared transmitter output. -+ This is an alternative to "gpio-ir-tx". pwm-ir-tx makes use -+ of PWM0 to reduce the CPU load during transmission compared to -+ gpio-ir-tx which uses bit-banging. -+ Legal pin,function combinations are: -+ 12,4(Alt0) 18,2(Alt5) 40,4(Alt0) 52,5(Alt1) -+Load: dtoverlay=pwm-ir-tx,= -+Params: gpio_pin Output GPIO (default 18) -+ -+ func Pin function (default 2 = Alt5) -+ -+ - Name: qca7000 - Info: I2SE's Evaluation Board for PLC Stamp micro - Load: dtoverlay=qca7000,= -diff --git a/arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts b/arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..a2e271f0f2029acec85637c0ffa9dc5b2f0463a8 ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/gpio-ir-tx-overlay.dts -@@ -0,0 +1,34 @@ -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&gpio>; -+ __overlay__ { -+ gpio_ir_tx_pins: gpio_ir_tx_pins { -+ brcm,pins = <18>; -+ brcm,function = <1>; // out -+ }; -+ }; -+ }; -+ -+ fragment@1 { -+ target-path = "/"; -+ __overlay__ { -+ gpio_ir_tx: gpio-ir-transmitter { -+ compatible = "gpio-ir-tx"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gpio_ir_tx_pins>; -+ gpios = <&gpio 18 0>; -+ }; -+ }; -+ }; -+ -+ __overrides__ { -+ gpio_pin = <&gpio_ir_tx>, "gpios:4", -+ <&gpio_ir_tx_pins>, "brcm,pins:0"; // pin number -+ invert = <&gpio_ir_tx>, "gpios:8"; // 1 = active low -+ }; -+}; -diff --git a/arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts b/arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..141c126fe33b90a16fea396b8e27692dc5274170 ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/pwm-ir-tx-overlay.dts -@@ -0,0 +1,40 @@ -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&gpio>; -+ __overlay__ { -+ pwm0_pins: pwm0_pins { -+ brcm,pins = <18>; -+ brcm,function = <2>; /* Alt5 */ -+ }; -+ }; -+ }; -+ -+ fragment@1 { -+ target = <&pwm>; -+ __overlay__ { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwm0_pins>; -+ status = "okay"; -+ }; -+ }; -+ -+ fragment@2 { -+ target-path = "/"; -+ __overlay__ { -+ pwm-ir-transmitter { -+ compatible = "pwm-ir-tx"; -+ pwms = <&pwm 0 100>; -+ }; -+ }; -+ }; -+ -+ __overrides__ { -+ gpio_pin = <&pwm0_pins>, "brcm,pins:0"; -+ func = <&pwm0_pins>,"brcm,function:0"; -+ }; -+}; - -From 7523613dbb06e105cdd31172c3d956c9876d26cb Mon Sep 17 00:00:00 2001 +From 3505d5bdd31a9d2365e981e458443077e11569da Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 Sep 2017 10:32:19 +0100 -Subject: [PATCH 127/170] amba_pl011: Insert mb() for correct FIFO handling +Subject: [PATCH 124/150] amba_pl011: Insert mb() for correct FIFO handling The pl011 register accessor functions use the _relaxed versions of the standard readl() and writel() functions, meaning that there are no @@ -134657,60 +134882,10 @@ index bfbc845d7be9ef804468d0a82da18d9b67857216..424bdc500864a86e5d431763ba416b52 return true; -From 02d264daf14d4b971387df3f6eaebb038242923a Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 13 Oct 2017 00:21:48 +0100 -Subject: [PATCH 128/170] dwc_otg: Fixup change to DRIVER_ATTR interface - ---- - drivers/usb/host/dwc_otg/dwc_otg_driver.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index 95943e07528276b26b51ea2d57a1f433f280aaef..af123d01f3ef9f99450c78efdf766ca35e15cbc9 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -259,7 +259,7 @@ static ssize_t version_show(struct device_driver *dev, char *buf) - DWC_DRIVER_VERSION); - } - --static DRIVER_ATTR(version, S_IRUGO, version_show, NULL); -+static DRIVER_ATTR_RO(version); - - /** - * Global Debug Level Mask. -@@ -269,7 +269,7 @@ uint32_t g_dbg_lvl = 0; /* OFF */ - /** - * This function shows the driver Debug Level. - */ --static ssize_t dbg_level_show(struct device_driver *drv, char *buf) -+static ssize_t debuglevel_show(struct device_driver *drv, char *buf) - { - return sprintf(buf, "0x%0x\n", g_dbg_lvl); - } -@@ -277,15 +277,14 @@ static ssize_t dbg_level_show(struct device_driver *drv, char *buf) - /** - * This function stores the driver Debug Level. - */ --static ssize_t dbg_level_store(struct device_driver *drv, const char *buf, -+static ssize_t debuglevel_store(struct device_driver *drv, const char *buf, - size_t count) - { - g_dbg_lvl = simple_strtoul(buf, NULL, 16); - return count; - } - --static DRIVER_ATTR(debuglevel, S_IRUGO | S_IWUSR, dbg_level_show, -- dbg_level_store); -+static DRIVER_ATTR_RW(debuglevel); - - /** - * This function is called during module intialization - -From dbf8f210eb85bb49bc5d97013b039599266af05f Mon Sep 17 00:00:00 2001 +From 0cb10c8479770b8c33aa1f23d43a9c289d156a1d Mon Sep 17 00:00:00 2001 From: Chung-Hsien Hsu Date: Sun, 14 May 2017 20:11:05 -0500 -Subject: [PATCH 129/170] brcmfmac: add CLM download support +Subject: [PATCH 125/150] brcmfmac: add CLM download support Future firmwares will be provided with minimal built-in CLM - the NULL region (#n/0) becomes the initial country. It cannot be changed @@ -135138,10 +135313,10 @@ index 11ffaa01599eb4b343b7f675dc275fc8572d127e..b27170c12482de0ca4115b4bc9484c21 static int brcmf_usb_bus_setup(struct brcmf_usbdev_info *devinfo) -From d52c2a11aa70514dc26f85d5b0a90089366ee276 Mon Sep 17 00:00:00 2001 +From 9baf711884a54f95f0d28fd5418deac014819597 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 6 Oct 2017 13:23:32 +0100 -Subject: [PATCH 130/170] brcmfmac: request_firmware_direct is quieter +Subject: [PATCH 126/150] brcmfmac: request_firmware_direct is quieter Since we don't have any CLM-capable firmware yet, silence the warning of its absence by using request_firmware_direct, which should also @@ -135166,10 +135341,10 @@ index f0309e039592ba6e388084a13f052c03f99cf1ef..b5889360da96096775db6425337a7215 if (err == -ENOENT) return 0; -From 69df4718ee2f7413e97672326327c403170f6fde Mon Sep 17 00:00:00 2001 +From 5eb9ecd1e0ec47ef5240711971760ab7be5034a2 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 29 Sep 2017 10:32:19 +0100 -Subject: [PATCH 131/170] amba_pl011: Add cts-event-workaround DT property +Subject: [PATCH 127/150] amba_pl011: Add cts-event-workaround DT property The BCM2835 PL011 implementation seems to have a bug that can lead to a transmission lockup if CTS changes frequently. A workaround was added to @@ -135184,9 +135359,8 @@ See: https://github.com/raspberrypi/linux/issues/1280 Signed-off-by: Phil Elwell --- Documentation/devicetree/bindings/serial/pl011.txt | 3 +++ - arch/arm/boot/dts/bcm270x.dtsi | 5 +++++ drivers/tty/serial/amba-pl011.c | 5 +++++ - 3 files changed, 13 insertions(+) + 2 files changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt index 77863aefe9ef1eafe648b530c1570333aea7940b..8d65b0ec2828b6abb07589407a5126fde6e49a0e 100644 @@ -135202,22 +135376,6 @@ index 77863aefe9ef1eafe648b530c1570333aea7940b..8d65b0ec2828b6abb07589407a5126fd See also bindings/arm/primecell.txt -diff --git a/arch/arm/boot/dts/bcm270x.dtsi b/arch/arm/boot/dts/bcm270x.dtsi -index 81914a615c8b011fe7d70a2e14f16491947c49b7..d312c2739624eca57b218b26e272e187012cb7d1 100644 ---- a/arch/arm/boot/dts/bcm270x.dtsi -+++ b/arch/arm/boot/dts/bcm270x.dtsi -@@ -26,6 +26,11 @@ - interrupts = <2 17>, <2 18>; - }; - -+ serial@7e201000 { /* uart0 */ -+ /* Enable CTS bug workaround */ -+ cts-event-workaround; -+ }; -+ - i2s@7e203000 { /* i2s */ - #sound-dai-cells = <0>; - reg = <0x7e203000 0x24>; diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 424bdc500864a86e5d431763ba416b5298c777dc..b224306633f62c398ef904734a903d4e75df65c3 100644 --- a/drivers/tty/serial/amba-pl011.c @@ -135235,10 +135393,10 @@ index 424bdc500864a86e5d431763ba416b5298c777dc..b224306633f62c398ef904734a903d4e uap->vendor = vendor; uap->fifosize = vendor->get_fifosize(dev); -From 87c2e47318010f137483bc9112d15f0eb15cf440 Mon Sep 17 00:00:00 2001 +From fc0c08f7e445eab7a976285c4bb75e4c7113cfed Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 11 Oct 2017 13:48:04 +0100 -Subject: [PATCH 132/170] amba-pl011: Report AUTOCTS capability to framework +Subject: [PATCH 128/150] amba-pl011: Report AUTOCTS capability to framework The PL011 has full hardware RTS/CTS support which is enabled by the driver when flow control is requested. However, it doesn't @@ -135281,47 +135439,10 @@ index b224306633f62c398ef904734a903d4e75df65c3..3b743cf8a94c279ff8d0b747f98062d0 if (uap->vendor->oversampling) { -From 8f8cf15798f3424355a579934c6cec4bf80a6565 Mon Sep 17 00:00:00 2001 -From: neilneil2000 <31366098+neilneil2000@users.noreply.github.com> -Date: Thu, 12 Oct 2017 17:29:43 +0100 -Subject: [PATCH 133/170] GPIO and gpio-poweroff clarifications - -Notes added: -1) All GPIO references use the hardware numbering scheme -2) Enabling gpio-poweroff prevents the ability to boot the pi by driving GPIO3 low ---- - arch/arm/boot/dts/overlays/README | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index eafbf530acdab53c74656e409319c6dcaefbfd4e..705c4ae77e5c5c36a9c05666e1d39476986e2277 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -33,6 +33,9 @@ needed. - Configuring additional, optional hardware is done using Device Tree overlays - (see below). - -+GPIO numbering uses the hardware pin numbering scheme (aka BCM scheme) and -+not the physical pin numbers. -+ - raspi-config - ============ - -@@ -507,7 +510,8 @@ Params: gpio_pin Output GPIO (default 18) - - - Name: gpio-poweroff --Info: Drives a GPIO high or low on poweroff (including halt) -+Info: Drives a GPIO high or low on poweroff (including halt). Enabling this -+ overlay will prevent the ability to boot by driving GPIO3 low. - Load: dtoverlay=gpio-poweroff,= - Params: gpiopin GPIO for signalling (default 26) - - -From 7eac99a46d92ef3bc4f5b23a4ae9902b9b5b1bf5 Mon Sep 17 00:00:00 2001 +From 3e48b9a3ef2e5f375b11bcfb180aa8c991cacb77 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 25 Oct 2017 09:20:56 +0100 -Subject: [PATCH 134/170] scripts: Update mkknlimg, just in case +Subject: [PATCH 129/150] scripts: Update mkknlimg, just in case With the removal of the vc_cma driver, mkknlimg lost an indication that the user had built a downstream kernel. Update the script, adding a few @@ -135364,316 +135485,10 @@ index 84be2593ec1de8f97b0167ff06b3e05d231c4ba0..d72e15224232d5164374e93be48949bf my $res = try_extract($kernel_file, $tmpfile1); -From 5889fc62e8d114b8b38812859f1eecee7a420db7 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 30 Oct 2017 15:06:42 +0000 -Subject: [PATCH 135/170] ARM: dts: Swap serial aliases for BT-enabled Pis - -The upstream base dts files now define serial0 and serial1 [1]. This -appears to the firmware like a user-specified preference via an overlay, -so it is necessary for Pi models with Bluetooth to swap the aliases in -the DTBs in order to get the correct UART role assignments. - -This commit includes a minor cosmetic change that moves the chosen -node into the same block as the model property, to match upstream -files. - -Signed-off-by: Phil Elwell - -[1] Upstream commit f08f58a2bf68900a84e782b8c7ad701c0654173c ---- - arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 15 +++++++++------ - arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 15 +++++++++------ - 2 files changed, 18 insertions(+), 12 deletions(-) - -diff --git a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts -index fba0041d5546871be643dc8b671db3a153d5c801..a6ef9ee67ef8ca7eb88808bc9afcd89ce3af1f0d 100644 ---- a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts -+++ b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts -@@ -4,6 +4,15 @@ - - / { - model = "Raspberry Pi Zero W"; -+ -+ chosen { -+ bootargs = "8250.nr_uarts=1"; -+ }; -+ -+ aliases { -+ serial0 = &uart1; -+ serial1 = &uart0; -+ }; - }; - - &gpio { -@@ -147,12 +156,6 @@ - pinctrl-0 = <&audio_pins>; - }; - --/ { -- chosen { -- bootargs = "8250.nr_uarts=1"; -- }; --}; -- - / { - __overrides__ { - act_led_gpio = <&act_led>,"gpios:4"; -diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index 634add7ab8bc0aa5501508c97050b101aa0e94f4..e032516ffd351a4099d150767a112f195d678b5a 100644 ---- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -@@ -9,6 +9,15 @@ - - / { - model = "Raspberry Pi 3 Model B"; -+ -+ chosen { -+ bootargs = "8250.nr_uarts=1"; -+ }; -+ -+ aliases { -+ serial0 = &uart1; -+ serial1 = &uart0; -+ }; - }; - - &gpio { -@@ -172,12 +181,6 @@ - pinctrl-0 = <&audio_pins>; - }; - --/ { -- chosen { -- bootargs = "8250.nr_uarts=1"; -- }; --}; -- - / { - __overrides__ { - act_led_gpio = <&act_led>,"gpios:4"; - -From 10e96747ef5611f12af0814a02cf9cff0355e90b Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Thu, 2 Nov 2017 09:16:17 +0000 -Subject: [PATCH 136/170] bcm2710: Refactor bcm2710.dtsi using bcm2837.dtsi - (#2236) - -The 4.14 tree includes bcm2837.dtsi - use it as a basis for -the downstream bcm2710.dtsi, which only contains a few tweaks. - -See: https://github.com/raspberrypi/linux/issues/2235 - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/bcm2708-rpi.dtsi | 2 - - arch/arm/boot/dts/bcm2710.dtsi | 128 ++----------------------------------- - 2 files changed, 5 insertions(+), 125 deletions(-) - -diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi -index f88b844f0aff82742966fd820f6f69cf25c2dfab..54fadb5543d09c848a9959302765b404c34910cc 100644 ---- a/arch/arm/boot/dts/bcm2708-rpi.dtsi -+++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi -@@ -156,7 +156,5 @@ sdhost_pins: &sdhost_gpio48 { - }; - - &cpu_thermal { -- coefficients = <(-538) 407000>; -- - /delete-node/ trips; - }; -diff --git a/arch/arm/boot/dts/bcm2710.dtsi b/arch/arm/boot/dts/bcm2710.dtsi -index 3e134a1208610b90e2d0fc22f03c6e9f372bfcd7..df4a91e266422eec15fd7e27d509309afcdbe809 100644 ---- a/arch/arm/boot/dts/bcm2710.dtsi -+++ b/arch/arm/boot/dts/bcm2710.dtsi -@@ -1,23 +1,9 @@ --#include "bcm283x.dtsi" -+#include "bcm2837.dtsi" - #include "bcm270x.dtsi" - #include "bcm2708-rpi.dtsi" - - / { -- compatible = "brcm,bcm2837", "brcm,bcm2836"; -- model = "BCM2837"; -- - soc { -- ranges = <0x7e000000 0x3f000000 0x01000000>, -- <0x40000000 0x40000000 0x00040000>; -- dma-ranges = <0xc0000000 0x00000000 0x3f000000>; -- -- local_intc: local_intc { -- compatible = "brcm,bcm2836-l1-intc"; -- reg = <0x40000000 0x100>; -- interrupt-controller; -- #interrupt-cells = <1>; -- interrupt-parent = <&local_intc>; -- }; - - arm-pmu { - #ifdef RPI364 -@@ -29,120 +15,16 @@ - interrupts = <9>; - }; - -- timer { --#ifdef RPI364 -- compatible = "arm,armv8-timer", "arm,armv7-timer"; --#else -- compatible = "arm,armv7-timer"; --#endif -- interrupt-parent = <&local_intc>; -- interrupts = <0>, // PHYS_SECURE_PPI -- <1>, // PHYS_NONSECURE_PPI -- <3>, // VIRT_PPI -- <2>; // HYP_PPI -- always-on; -- }; -- - syscon@40000000 { - compatible = "brcm,bcm2836-arm-local", "syscon"; - reg = <0x40000000 0x100>; - }; - }; - --#ifdef RPI364 -- cpus: cpus { -- #address-cells = <1>; -- #size-cells = <0>; -- -- v8_cpu0: cpu@0 { -- device_type = "cpu"; -- compatible = "arm,cortex-a53", "arm,armv8"; -- reg = <0x0>; -- clock-frequency = <1200000000>; -- }; -- -- v8_cpu1: cpu@1 { -- device_type = "cpu"; -- compatible = "arm,cortex-a53", "arm,armv8"; -- reg = <0x1>; -- clock-frequency = <1200000000>; -- enable-method = "spin-table"; -- cpu-release-addr = <0x0 0x000000e0>; -- }; -- -- v8_cpu2: cpu@2 { -- device_type = "cpu"; -- compatible = "arm,cortex-a53", "arm,armv8"; -- reg = <0x2>; -- clock-frequency = <1200000000>; -- enable-method = "spin-table"; -- cpu-release-addr = <0x0 0x000000e8>; -- }; -- -- v8_cpu3: cpu@3 { -- device_type = "cpu"; -- compatible = "arm,cortex-a53", "arm,armv8"; -- reg = <0x3>; -- clock-frequency = <1200000000>; -- enable-method = "spin-table"; -- cpu-release-addr = <0x0 0x000000f0>; -- }; -- }; -- -- __overrides__ { -- arm_freq = <&v8_cpu0>, "clock-frequency:0", -- <&v8_cpu1>, "clock-frequency:0", -- <&v8_cpu2>, "clock-frequency:0", -- <&v8_cpu3>, "clock-frequency:0"; -- }; -- --#else -- cpus: cpus { -- #address-cells = <1>; -- #size-cells = <0>; -- -- v7_cpu0: cpu@0 { -- device_type = "cpu"; -- compatible = "arm,cortex-a7"; -- reg = <0x000>; -- clock-frequency = <800000000>; -- }; -- -- v7_cpu1: cpu@1 { -- device_type = "cpu"; -- compatible = "arm,cortex-a7"; -- reg = <0x001>; -- clock-frequency = <800000000>; -- }; -- -- v7_cpu2: cpu@2 { -- device_type = "cpu"; -- compatible = "arm,cortex-a7"; -- reg = <0x002>; -- clock-frequency = <800000000>; -- }; -- -- v7_cpu3: cpu@3 { -- device_type = "cpu"; -- compatible = "arm,cortex-a7"; -- reg = <0x003>; -- clock-frequency = <800000000>; -- }; -- }; -- - __overrides__ { -- arm_freq = <&v7_cpu0>, "clock-frequency:0", -- <&v7_cpu1>, "clock-frequency:0", -- <&v7_cpu2>, "clock-frequency:0", -- <&v7_cpu3>, "clock-frequency:0"; -+ arm_freq = <&cpu0>, "clock-frequency:0", -+ <&cpu1>, "clock-frequency:0", -+ <&cpu2>, "clock-frequency:0", -+ <&cpu3>, "clock-frequency:0"; - }; --#endif - }; -- --&intc { -- compatible = "brcm,bcm2836-armctrl-ic"; -- reg = <0x7e00b200 0x200>; -- interrupt-parent = <&local_intc>; -- interrupts = <8>; --}; -- - -From 85ec6f90137c37fc9af4226d14f45e4a168b8e9d Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 3 Nov 2017 09:45:12 +0000 -Subject: [PATCH 137/170] bcm2710: Fix compatible string in bcm2710.dtsi - -The minimal "bcm2835" board support, used for some clock setup -and serial/revision numbers, needs a compatible string of -"brcm,bcm2835" or "brcm,bcm2836" - "brcm,bcm2837" isn't -recognised. - -Fixes: bcm2710: Refactor bcm2710.dtsi using bcm2837.dtsi (#2236) - -See: https://github.com/raspberrypi/linux/issues/2255 - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/bcm2710.dtsi | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm/boot/dts/bcm2710.dtsi b/arch/arm/boot/dts/bcm2710.dtsi -index df4a91e266422eec15fd7e27d509309afcdbe809..d5ce5b60fb3b63a76831504c53145f828b089993 100644 ---- a/arch/arm/boot/dts/bcm2710.dtsi -+++ b/arch/arm/boot/dts/bcm2710.dtsi -@@ -3,6 +3,8 @@ - #include "bcm2708-rpi.dtsi" - - / { -+ compatible = "brcm,bcm2837", "brcm,bcm2836"; -+ - soc { - - arm-pmu { - -From 50fe905b7bda2968f4f497cd48e7a999e0680c87 Mon Sep 17 00:00:00 2001 +From 9381d7c74a5ce14b70938b837009760d9d404db3 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Tue, 14 Nov 2017 15:13:15 +0000 -Subject: [PATCH 138/170] AXI performance monitor driver (#2222) +Subject: [PATCH 130/150] AXI performance monitor driver (#2222) Uses the debugfs I/F to provide access to the AXI bus performance monitors. @@ -135684,54 +135499,12 @@ is done using direct register reads. Signed-off-by: James Hughes --- - arch/arm/boot/dts/bcm2708-rpi.dtsi | 2 + - arch/arm/boot/dts/bcm270x.dtsi | 8 + - drivers/perf/Kconfig | 7 + - drivers/perf/Makefile | 1 + - drivers/perf/raspberrypi_axi_monitor.c | 637 +++++++++++++++++++++++++++++ - include/soc/bcm2835/raspberrypi-firmware.h | 3 + - 6 files changed, 658 insertions(+) + drivers/perf/Kconfig | 7 + + drivers/perf/Makefile | 1 + + drivers/perf/raspberrypi_axi_monitor.c | 637 +++++++++++++++++++++++++++++++++ + 3 files changed, 645 insertions(+) create mode 100644 drivers/perf/raspberrypi_axi_monitor.c -diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi -index 54fadb5543d09c848a9959302765b404c34910cc..46a4d33e148438e4ca7c8cc17a328705000b1b3a 100644 ---- a/arch/arm/boot/dts/bcm2708-rpi.dtsi -+++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi -@@ -37,6 +37,7 @@ - fb = &fb; - vchiq = &vchiq; - thermal = &thermal; -+ axiperf = &axiperf; - }; - - leds: leds { -@@ -119,6 +120,7 @@ - sd_force_pio = <&sdhost>,"brcm,force-pio?"; - sd_pio_limit = <&sdhost>,"brcm,pio-limit:0"; - sd_debug = <&sdhost>,"brcm,debug"; -+ axiperf = <&axiperf>,"status"; - }; - }; - -diff --git a/arch/arm/boot/dts/bcm270x.dtsi b/arch/arm/boot/dts/bcm270x.dtsi -index d312c2739624eca57b218b26e272e187012cb7d1..6bb6fd2b16b661dcd48983c0df5626a6fe769dff 100644 ---- a/arch/arm/boot/dts/bcm270x.dtsi -+++ b/arch/arm/boot/dts/bcm270x.dtsi -@@ -130,6 +130,14 @@ - /* Add alias */ - status = "disabled"; - }; -+ -+ axiperf: axiperf { -+ compatible = "brcm,bcm2835-axiperf"; -+ reg = <0x7e009800 0x100>, -+ <0x7ee08000 0x100>; -+ firmware = <&firmware>; -+ status = "disabled"; -+ }; - }; - - vdd_5v0_reg: fixedregulator_5v0 { diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig index e5197ffb74229e580c9f088a3a5f609c72d253b5..736c22e00e8f8447e538229e502fb4eec917ddd9 100644 --- a/drivers/perf/Kconfig @@ -136400,25 +136173,11 @@ index 0000000000000000000000000000000000000000..bafe03b6c000060e78404d65a0aa96d8 +MODULE_DESCRIPTION("RPI AXI Performance monitor driver"); +MODULE_LICENSE("GPL"); + -diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h -index dc7fd58afd5dddebf9b17065bb069a1db663362c..cbd1674570433fc591df89f68c892b338a159e82 100644 ---- a/include/soc/bcm2835/raspberrypi-firmware.h -+++ b/include/soc/bcm2835/raspberrypi-firmware.h -@@ -88,6 +88,9 @@ enum rpi_firmware_property_tag { - RPI_FIRMWARE_SET_SDHOST_CLOCK = 0x00038042, - RPI_FIRMWARE_GET_GPIO_CONFIG = 0x00030043, - RPI_FIRMWARE_SET_GPIO_CONFIG = 0x00038043, -+ RPI_FIRMWARE_GET_PERIPH_REG = 0x00030045, -+ RPI_FIRMWARE_SET_PERIPH_REG = 0x00038045, -+ - - /* Dispmanx TAGS */ - RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001, -From f04ed657346170e1160926648e9120109029adc6 Mon Sep 17 00:00:00 2001 +From cf82a931f06f4c996205af80a9b2c6d56ce88693 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Fri, 21 Jul 2017 09:55:12 +0100 -Subject: [PATCH 139/170] Sets the BCDC priority to constant 0 +Subject: [PATCH 131/150] Sets the BCDC priority to constant 0 This is to workaround for a possible issue in the wireless chip firmware where some packets with @@ -136444,338 +136203,10 @@ index 9f2d0b0cf6e5c452ad85a3caef58cf16a8cdad46..b009f3083490c2bc2733424f08f81b9f h->data_offset = offset; BCDC_SET_IF_IDX(h, ifidx); -From 5692fbfbad799b98386f5bf689773ecbde515388 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= -Date: Sun, 16 Jul 2017 00:13:36 +0200 -Subject: [PATCH 140/170] BCM270X_DT: Add PaPiRus overlay -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Add Device Tree overlay for the PaPiRus ePaper Screens by Pi Supply. - -Signed-off-by: Noralf Trønnes ---- - arch/arm/boot/dts/overlays/Makefile | 1 + - arch/arm/boot/dts/overlays/README | 11 ++++ - arch/arm/boot/dts/overlays/papirus-overlay.dts | 89 ++++++++++++++++++++++++++ - 3 files changed, 101 insertions(+) - create mode 100644 arch/arm/boot/dts/overlays/papirus-overlay.dts - -diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index df9ec4c40d2438837e0c34ad305bd46fe8f559e2..b8771396608df877ca0832ce2b36972530c655bc 100644 ---- a/arch/arm/boot/dts/overlays/Makefile -+++ b/arch/arm/boot/dts/overlays/Makefile -@@ -65,6 +65,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ - mmc.dtbo \ - mpu6050.dtbo \ - mz61581.dtbo \ -+ papirus.dtbo \ - pi3-act-led.dtbo \ - pi3-disable-bt.dtbo \ - pi3-disable-wifi.dtbo \ -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 705c4ae77e5c5c36a9c05666e1d39476986e2277..6f6daf2164add0af2363befec3ec521b367c402e 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -1016,6 +1016,17 @@ Params: speed Display SPI bus speed - xohms Touchpanel sensitivity (X-plate resistance) - - -+Name: papirus -+Info: PaPiRus ePaper Screen by Pi Supply (both HAT and pHAT) -+Load: dtoverlay=papirus,= -+Params: panel Display panel (required): -+ 1.44": e1144cs021 -+ 2.0": e2200cs021 -+ 2.7": e2271cs021 -+ -+ speed Display SPI bus speed -+ -+ - [ The pcf2127-rtc overlay has been deleted. See i2c-rtc. ] - - -diff --git a/arch/arm/boot/dts/overlays/papirus-overlay.dts b/arch/arm/boot/dts/overlays/papirus-overlay.dts -new file mode 100644 -index 0000000000000000000000000000000000000000..58eb8847f9ed8746cbffdbf4cdc83711a9201e83 ---- /dev/null -+++ b/arch/arm/boot/dts/overlays/papirus-overlay.dts -@@ -0,0 +1,89 @@ -+/* PaPiRus ePaper Screen by Pi Supply */ -+ -+/dts-v1/; -+/plugin/; -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ -+ fragment@0 { -+ target = <&i2c_arm>; -+ __overlay__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ display_temp: lm75@48 { -+ compatible = "lm75b"; -+ reg = <0x48>; -+ status = "okay"; -+ #thermal-sensor-cells = <0>; -+ }; -+ }; -+ }; -+ -+ fragment@1 { -+ target-path = "/"; -+ __overlay__ { -+ thermal-zones { -+ display { -+ polling-delay-passive = <0>; -+ polling-delay = <0>; -+ thermal-sensors = <&display_temp>; -+ }; -+ }; -+ }; -+ }; -+ -+ fragment@2 { -+ target = <&spi0>; -+ __overlay__ { -+ status = "okay"; -+ -+ spidev@0{ -+ status = "disabled"; -+ }; -+ }; -+ }; -+ -+ fragment@3 { -+ target = <&gpio>; -+ __overlay__ { -+ repaper_pins: repaper_pins { -+ brcm,pins = <14 15 23 24 25>; -+ brcm,function = <1 1 1 1 0>; /* out out out out in */ -+ }; -+ }; -+ }; -+ -+ fragment@4 { -+ target = <&spi0>; -+ __overlay__ { -+ /* needed to avoid dtc warning */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ repaper: repaper@0{ -+ compatible = "not_set"; -+ reg = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&repaper_pins>; -+ -+ spi-max-frequency = <8000000>; -+ -+ panel-on-gpios = <&gpio 23 0>; -+ border-gpios = <&gpio 14 0>; -+ discharge-gpios = <&gpio 15 0>; -+ reset-gpios = <&gpio 24 0>; -+ busy-gpios = <&gpio 25 0>; -+ -+ repaper-thermal-zone = "display"; -+ }; -+ }; -+ }; -+ -+ __overrides__ { -+ panel = <&repaper>, "compatible"; -+ speed = <&repaper>, "spi-max-frequency:0"; -+ }; -+}; - -From 575ed221f2c58cfdf7a99f83d2108bdb18531f26 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Sat, 18 Nov 2017 20:40:28 +0000 -Subject: [PATCH 141/170] BCM2708_DT: Undo downstream changes to upstream dtsis - -Move the bcm283x.dtsi modifications into bcm270x.dtsi, except for the -SPI gpio declarations which are added in board-specific dts files. - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/bcm270x.dtsi | 23 +++++++++++++++++++++++ - arch/arm/boot/dts/bcm283x.dtsi | 13 +++---------- - 2 files changed, 26 insertions(+), 10 deletions(-) - -diff --git a/arch/arm/boot/dts/bcm270x.dtsi b/arch/arm/boot/dts/bcm270x.dtsi -index 6bb6fd2b16b661dcd48983c0df5626a6fe769dff..a3544c1f5b9dce153bb22f94b6728d6ecd901777 100644 ---- a/arch/arm/boot/dts/bcm270x.dtsi -+++ b/arch/arm/boot/dts/bcm270x.dtsi -@@ -156,3 +156,26 @@ - regulator-always-on; - }; - }; -+ -+/* Configure and use the auxilliary interrupt controller */ -+ -+&aux { -+ interrupts = <1 29>; -+ interrupt-controller; -+ #interrupt-cells = <1>; -+}; -+ -+&uart1 { -+ interrupt-parent = <&aux>; -+ interrupts = <0>; -+}; -+ -+&spi1 { -+ interrupt-parent = <&aux>; -+ interrupts = <1>; -+}; -+ -+&spi2 { -+ interrupt-parent = <&aux>; -+ interrupts = <2>; -+}; -diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi -index 8617ffdb2463ff307a3de32b74003e8a621119d5..013431e3d7c3140d3a0645bdf4f130e9a860f984 100644 ---- a/arch/arm/boot/dts/bcm283x.dtsi -+++ b/arch/arm/boot/dts/bcm283x.dtsi -@@ -413,7 +413,6 @@ - #address-cells = <1>; - #size-cells = <0>; - status = "disabled"; -- cs-gpios = <&gpio 8 1>, <&gpio 7 1>; - }; - - i2c0: i2c@7e205000 { -@@ -470,16 +469,12 @@ - #clock-cells = <1>; - reg = <0x7e215000 0x8>; - clocks = <&clocks BCM2835_CLOCK_VPU>; -- interrupts = <1 29>; -- interrupt-controller; -- #interrupt-cells = <1>; - }; - - uart1: serial@7e215040 { - compatible = "brcm,bcm2835-aux-uart"; - reg = <0x7e215040 0x40>; -- interrupt-parent = <&aux>; -- interrupts = <0>; -+ interrupts = <1 29>; - clocks = <&aux BCM2835_AUX_CLOCK_UART>; - status = "disabled"; - }; -@@ -487,8 +482,7 @@ - spi1: spi@7e215080 { - compatible = "brcm,bcm2835-aux-spi"; - reg = <0x7e215080 0x40>; -- interrupt-parent = <&aux>; -- interrupts = <1>; -+ interrupts = <1 29>; - clocks = <&aux BCM2835_AUX_CLOCK_SPI1>; - #address-cells = <1>; - #size-cells = <0>; -@@ -498,8 +492,7 @@ - spi2: spi@7e2150c0 { - compatible = "brcm,bcm2835-aux-spi"; - reg = <0x7e2150c0 0x40>; -- interrupt-parent = <&aux>; -- interrupts = <2>; -+ interrupts = <1 29>; - clocks = <&aux BCM2835_AUX_CLOCK_SPI2>; - #address-cells = <1>; - #size-cells = <0>; - -From 2973bf0f5dbf87143a4f23698867a8377d62d801 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 21 Nov 2017 09:55:25 +0000 -Subject: [PATCH 142/170] dwc_otg: Fix compilation warnings - -Signed-off-by: Phil Elwell ---- - drivers/usb/host/dwc_otg/dwc_otg_attr.c | 6 ++++-- - drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 1 - - drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 1 - - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c -index 9da0c92aaeca2fc393016442cc6578cb4a52c978..2f8ea77c3892b678cfacb61c70b95eebdbc553ac 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_attr.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c -@@ -918,9 +918,11 @@ DEVICE_ATTR(regdump, S_IRUGO, regdump_show, 0); - static ssize_t spramdump_show(struct device *_dev, - struct device_attribute *attr, char *buf) - { -- dwc_otg_device_t *otg_dev = dwc_otg_drvdev(_dev); -+#if 0 -+ dwc_otg_device_t *otg_dev = dwc_otg_drvdev(_dev); - -- //dwc_otg_dump_spram(otg_dev->core_if); -+ dwc_otg_dump_spram(otg_dev->core_if); -+#endif - - return sprintf(buf, "SPRAM Dump\n"); - } -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 7710370b30363e3170bf9bf522597c5f41dfb908..0c28a6e44299bffd42c501497b6fa02206c2b620 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -2005,7 +2005,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) - dwc_list_link_t *qh_ptr; - dwc_otg_qh_t *qh; - int num_channels; -- dwc_irqflags_t flags; - dwc_otg_transaction_type_e ret_val = DWC_OTG_TRANSACTION_NONE; - - #ifdef DEBUG_HOST_CHANNELS -diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index c8f52709a7d24974c0a38dcf1708f91073e96b0e..6947e98b87adb6a5002127215943ad1ac126a05f 100644 ---- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -948,7 +948,6 @@ static void release_channel(dwc_otg_hcd_t * hcd, - { - dwc_otg_transaction_type_e tr_type; - int free_qtd; -- dwc_irqflags_t flags; - - int hog_port = 0; - - -From e07afe95569116cb534a91b2d966d18b63eae9aa Mon Sep 17 00:00:00 2001 -From: Alistair Buxton -Date: Sat, 28 Oct 2017 04:58:26 +0100 -Subject: [PATCH 143/170] BCM_VC_SM: select DMA_SHARED_BUFFER - -This driver was refactored to use the kernel DMA buffer sharing api -in commit a97390852b14e8f06cf579adaaf8b664184e92d2. - -Per Documentation/dma-buf-sharing.txt, it must select DMA_SHARED_BUFFER -in its Kconfig. - -Signed-off-by: Alistair Buxton ---- - drivers/char/broadcom/Kconfig | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig -index 014c7a15e85c6eff99f840fbc44fc6c83f2d9c91..cffd17df6a1b62cc347331a9eaaf8f47fbbbb431 100644 ---- a/drivers/char/broadcom/Kconfig -+++ b/drivers/char/broadcom/Kconfig -@@ -27,6 +27,7 @@ config BCM_VC_SM - bool "VMCS Shared Memory" - depends on BCM2835_VCHIQ - select BCM2708_VCMEM -+ select DMA_SHARED_BUFFER - default n - help - Support for the VC shared memory on the Broadcom reference - -From 734db5ee091bbea6249491add6f11ed780363ea7 Mon Sep 17 00:00:00 2001 +From 651b691735de48abc5f1a956a2c4711351e9378f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 26 Apr 2016 13:46:13 -0700 -Subject: [PATCH 144/170] drm/panel: Add support for the Raspberry Pi 7" +Subject: [PATCH 132/150] drm/panel: Add support for the Raspberry Pi 7" Touchscreen. This driver communicates with the Atmel microcontroller for sequencing @@ -137356,10 +136787,10 @@ index 0000000000000000000000000000000000000000..1a536fe4d040f5fafe324baee110a622 +MODULE_DESCRIPTION("Raspberry Pi 7-inch touchscreen driver"); +MODULE_LICENSE("GPL v2"); -From a733e632a018372dde48f9d938501c8ddec4b540 Mon Sep 17 00:00:00 2001 +From 1f3743ba05a9df789ba541d8f5d734f520bd17f4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 12 Apr 2017 17:52:56 -0700 -Subject: [PATCH 145/170] panel-raspberrypi-touchscreen: Fix NULL deref if +Subject: [PATCH 133/150] panel-raspberrypi-touchscreen: Fix NULL deref if probe order goes wrong. If the i2c driver hadn't pobed before the panel driver probes, then @@ -137386,10 +136817,10 @@ index 1a536fe4d040f5fafe324baee110a6225dd0be08..5d6bfd81b07a11a0cb407f4301d22931 } -From b5189eea36a38ea527a40ad198b1f4b58efd9092 Mon Sep 17 00:00:00 2001 +From 09836dcfce1a29febefa1006f3257acaa298c097 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 6 Mar 2017 12:17:16 -0800 -Subject: [PATCH 146/170] panel-raspberrypi-touchscreen: Round up clk rate to +Subject: [PATCH 134/150] panel-raspberrypi-touchscreen: Round up clk rate to fix DSI panel. Commit 488f9bc8e3def93e0baef53cee2026c2cb0d8956 slightly increased the @@ -137424,10 +136855,10 @@ index 5d6bfd81b07a11a0cb407f4301d22931705fb8b1..b57b7ad9aa4c5048186e98553af59ec9 .hsync_start = HACT + HFP, .hsync_end = HACT + HFP + HSW, -From d085fe18ab5b241e1aa9ac2d528b104b3ba888f8 Mon Sep 17 00:00:00 2001 +From 0b6ed27389b478b5615c07df69639be9f20f304d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Jun 2016 12:29:45 -0700 -Subject: [PATCH 147/170] BCM270X: Add the DSI panel to the defconfig. +Subject: [PATCH 135/150] BCM270X: Add the DSI panel to the defconfig. Signed-off-by: Eric Anholt --- @@ -137448,10 +136879,10 @@ index 9dcb58a519d041fadae99c81a7bda621b2a49f12..003209bf2362c2a136ab987b2f20065e CONFIG_DRM_VC4=m CONFIG_FB=y -From 3ccbfb40b82bf474877b991ceba3f7ddc3e6bfb6 Mon Sep 17 00:00:00 2001 +From 9fbf1d4ea4596e6b64ee23493bec3dbd5ddcf626 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 6 Jul 2017 11:45:48 -0700 -Subject: [PATCH 148/170] drm/vc4: Add support for setting DPMS in firmwarekms. +Subject: [PATCH 136/150] drm/vc4: Add support for setting DPMS in firmwarekms. This ensures that the screen goes blank during DPMS (screensaver), including the cursor. Planes don't necessarily get disabled during @@ -137554,10 +136985,10 @@ index d170775ccc985637ff018804f510a5003933c9ec..766f700417f7194d6b01fa1bc18dad40 if (!vc4_encoder) return -ENOMEM; -From 5032c888b187114f3ec0f6e9781ead735fc7b962 Mon Sep 17 00:00:00 2001 +From adbd76238d4554e28f7060330252200cbfe5ec0e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 14 Jul 2017 17:33:08 -0700 -Subject: [PATCH 149/170] drm/vc4: Fix pitch setup for T-format scanout. +Subject: [PATCH 137/150] drm/vc4: Fix pitch setup for T-format scanout. The documentation said to use src_w here, and I didn't consider that we actually needed to be using pitch somewhere in our setup. Fixes @@ -137605,10 +137036,10 @@ index 2968b3ebb895714cb8c8faeaf40dff1c996f2259..4ad0b9fcae99f74fb89d09dd52d9ffe5 DRM_DEBUG_KMS("Unsupported FB tiling flag 0x%16llx", (long long)fb->modifier); -From b2854b88a4af89ed40432a27c7863f388a8865a8 Mon Sep 17 00:00:00 2001 +From eb3ab1fee74d52bc568767f9c0cb6e4f652e51a7 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 24 Aug 2017 16:16:16 +0100 -Subject: [PATCH 150/170] brcmfmac: Disable ARP offloading when promiscuous +Subject: [PATCH 138/150] brcmfmac: Disable ARP offloading when promiscuous This is a test patch for brcmfmac from Franky Lin at Broadcom to disable ARP offloading when in promiscuous mode, re-enabling the ability to @@ -137745,10 +137176,10 @@ index a4dd313140f37dc1fbb6955e1148f48bccf22f44..b9a96cbc70f0865ee8c9cff3c6164144 bool is_p2pdev, const char *name, u8 *mac_addr); void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked); -From 23c9adebdac997c04058b0cf16eb81ee95ae64fa Mon Sep 17 00:00:00 2001 +From e76d76dafb85d59ee35df446850cf34d462c99cb Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Sat, 16 Sep 2017 21:08:22 -0700 -Subject: [PATCH 151/170] brcmfmac: Avoid possible out-of-bounds read +Subject: [PATCH 139/150] brcmfmac: Avoid possible out-of-bounds read In brcmf_p2p_notify_rx_mgmt_p2p_probereq(), chanspec is assigned before the length of rxframe is validated. This could lead to uninitialized @@ -137786,10 +137217,10 @@ index 2ce675ab40ef867cf6a86ca5257a6db7ef76e80a..1c450c0727cb577f7dae25a1ce82b2db return 0; } -From 3049eb65ee0d8fedb67119ec608fa82f1c8a4c1a Mon Sep 17 00:00:00 2001 +From a762f2eeabfc03a5b495f06cfcfcfd802949e83b Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Sat, 16 Sep 2017 21:08:23 -0700 -Subject: [PATCH 152/170] brcmfmac: Delete redundant length check +Subject: [PATCH 140/150] brcmfmac: Delete redundant length check brcmf_fweh_process_event() sets event->datalen to the endian-swapped value of event_packet->msg.datalen, which is the @@ -137820,835 +137251,10 @@ index ef72baf6dd969c2478a2138ea57b9f691fdf12d8..e7eaa57d11d98f61280bd99013e649aa /* special handling of interface event */ if (event->code == BRCMF_E_IF) { -From 67a7d2a02acfda7c4b6a222a9ec5ca70e0371b2a Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 13 Nov 2017 13:00:14 +0000 -Subject: [PATCH 153/170] USB_DWCOTG: Disable building dwc_otg as a module - (#2265) - -When dwc_otg is built as a module, build will fail with the following -error: - -ERROR: "DWC_TASK_HI_SCHEDULE" [drivers/usb/host/dwc_otg/dwc_otg.ko] undefined! -scripts/Makefile.modpost:91: recipe for target '__modpost' failed -make[1]: *** [__modpost] Error 1 -Makefile:1199: recipe for target 'modules' failed -make: *** [modules] Error 2 - -Even if the error is solved by including the missing -DWC_TASK_HI_SCHEDULE function, the kernel will panic when loading -dwc_otg. - -As a workaround, simply prevent user from building dwc_otg as a module -as the current kernel does not support it. - -See: https://github.com/raspberrypi/linux/issues/2258 - -Signed-off-by: Malik Olivier Boussejra ---- - drivers/usb/host/Kconfig | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 64ed87af62b3d38db663cc77978b024d0f020f65..9eeb88a5b6e6b4e728d18abf6175ef19986c6bdc 100644 ---- a/drivers/usb/host/Kconfig -+++ b/drivers/usb/host/Kconfig -@@ -772,7 +772,7 @@ config USB_HWA_HCD - will be called "hwa-hc". - - config USB_DWCOTG -- tristate "Synopsis DWC host support" -+ bool "Synopsis DWC host support" - depends on USB && (FIQ || ARM64) - help - The Synopsis DWC controller is a dual-role -@@ -781,9 +781,6 @@ config USB_DWCOTG - Enable this option to support this IP in host controller mode. - If unsure, say N. - -- To compile this driver as a module, choose M here: the -- modules built will be called dwc_otg and dwc_common_port. -- - config USB_IMX21_HCD - tristate "i.MX21 HCD support" - depends on ARM && ARCH_MXC - -From 5b0a52c7236492fc6cf03301a5aff299f066090c Mon Sep 17 00:00:00 2001 -From: allocom -Date: Thu, 27 Jul 2017 23:49:36 +0530 -Subject: [PATCH 154/170] allo-piano-dac-plus: Master volume added + fixes - -Master volume added, which controls both DACs volumes. - -See: https://github.com/raspberrypi/linux/pull/2149 - -Also fix initial max volume, default mode value, and unmute. - -Signed-off-by: allocom ---- - sound/soc/bcm/allo-piano-dac-plus.c | 303 ++++++++++++++++++++++++++++++------ - 1 file changed, 256 insertions(+), 47 deletions(-) - -diff --git a/sound/soc/bcm/allo-piano-dac-plus.c b/sound/soc/bcm/allo-piano-dac-plus.c -index d4e99e3c6a383d92fb0cf9e8c1cd1e7657358d49..1800f5e4d414e2d83a9487a89a2800a3e1ec01b1 100644 ---- a/sound/soc/bcm/allo-piano-dac-plus.c -+++ b/sound/soc/bcm/allo-piano-dac-plus.c -@@ -28,6 +28,13 @@ - #include - #include "../codecs/pcm512x.h" - -+#define P_DAC_LEFT_MUTE 0x10 -+#define P_DAC_RIGHT_MUTE 0x01 -+#define P_DAC_MUTE 0x11 -+#define P_DAC_UNMUTE 0x00 -+#define P_MUTE 1 -+#define P_UNMUTE 0 -+ - struct dsp_code { - char i2c_addr; - char offset; -@@ -111,7 +118,7 @@ static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, - rate = 192000; - - if (lowpass > 14) -- glb_ptr->set_lowpass = lowpass = 3; -+ glb_ptr->set_lowpass = lowpass = 0; - - if (mode > 3) - glb_ptr->set_mode = mode = 0; -@@ -129,16 +136,20 @@ static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, - 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); -+ snd_soc_write(rtd->codec_dais[0]->codec, -+ PCM512x_MUTE, P_DAC_UNMUTE); -+ snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_MUTE, P_DAC_MUTE); - glb_ptr->set_rate = rate; - glb_ptr->set_mode = mode; - glb_ptr->set_lowpass = lowpass; - return 1; - - default: -- snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, 0x00); -- snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, 0x00); -+ snd_soc_write(rtd->codec_dais[0]->codec, -+ PCM512x_MUTE, P_DAC_UNMUTE); -+ snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_MUTE, P_DAC_UNMUTE); - } - - for (dac = 0; dac < rtd->num_codecs; dac++) { -@@ -173,8 +184,8 @@ static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, - if (dsp_code_read->offset == 0) { - glb_ptr->dsp_page_number = dsp_code_read->val; - ret = snd_soc_write(rtd->codec_dais[dac]->codec, -- PCM512x_PAGE_BASE(0), -- dsp_code_read->val); -+ PCM512x_PAGE_BASE(0), -+ dsp_code_read->val); - - } else if (dsp_code_read->offset != 0) { - ret = snd_soc_write(rtd->codec_dais[dac]->codec, -@@ -211,8 +222,8 @@ static int snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd, - - mutex_lock(&glb_ptr->lock); - -- ret = __snd_allo_piano_dsp_program(rtd, -- mode, rate, lowpass); -+ ret = __snd_allo_piano_dsp_program(rtd, mode, rate, lowpass); -+ - mutex_unlock(&glb_ptr->lock); - - return ret; -@@ -238,28 +249,32 @@ static int snd_allo_piano_dual_mode_put(struct snd_kcontrol *kcontrol, - struct snd_card *snd_card_ptr = card->snd_card; - struct snd_kcontrol *kctl; - struct soc_mixer_control *mc; -- unsigned int left_val = 0; -+ unsigned int left_val = 0, right_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) { -+ } else { - if (glb_ptr->set_mode <= 0) { - glb_ptr->dual_mode = 1; - glb_ptr->set_mode = 0; -+ } else { -+ glb_ptr->dual_mode = 0; -+ return 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); -+ if (glb_ptr->dual_mode == 1) { // Dual Mono -+ snd_soc_write(rtd->codec_dais[0]->codec, -+ PCM512x_MUTE, P_DAC_RIGHT_MUTE); -+ snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_MUTE, P_DAC_LEFT_MUTE); - snd_soc_write(rtd->codec_dais[0]->codec, - PCM512x_DIGITAL_VOLUME_3, 0xff); -+ snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_2, 0xff); - - list_for_each_entry(kctl, &snd_card_ptr->controls, list) { - if (!strncmp(kctl->id.name, "Digital Playback Volume", -@@ -273,6 +288,9 @@ static int snd_allo_piano_dual_mode_put(struct snd_kcontrol *kcontrol, - } else { - left_val = snd_soc_read(rtd->codec_dais[0]->codec, - PCM512x_DIGITAL_VOLUME_2); -+ right_val = snd_soc_read(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_3); -+ - list_for_each_entry(kctl, &snd_card_ptr->controls, list) { - if (!strncmp(kctl->id.name, "Digital Playback Volume", - sizeof(kctl->id.name))) { -@@ -285,8 +303,12 @@ static int snd_allo_piano_dual_mode_put(struct snd_kcontrol *kcontrol, - - 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); -+ snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_2, right_val); -+ snd_soc_write(rtd->codec_dais[0]->codec, -+ PCM512x_MUTE, P_DAC_UNMUTE); -+ snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_MUTE, P_DAC_UNMUTE); - } - - return 0; -@@ -311,7 +333,7 @@ static int snd_allo_piano_mode_put(struct snd_kcontrol *kcontrol, - struct snd_card *snd_card_ptr = card->snd_card; - struct snd_kcontrol *kctl; - struct soc_mixer_control *mc; -- unsigned int left_val = 0; -+ unsigned int left_val = 0, right_val = 0; - - rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); - -@@ -319,6 +341,9 @@ static int snd_allo_piano_mode_put(struct snd_kcontrol *kcontrol, - (ucontrol->value.integer.value[0] > 0)) { - left_val = snd_soc_read(rtd->codec_dais[0]->codec, - PCM512x_DIGITAL_VOLUME_2); -+ right_val = snd_soc_read(rtd->codec_dais[1]->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))) { -@@ -330,6 +355,8 @@ static int snd_allo_piano_mode_put(struct snd_kcontrol *kcontrol, - } - snd_soc_write(rtd->codec_dais[0]->codec, - PCM512x_DIGITAL_VOLUME_3, left_val); -+ snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_3, right_val); - } - - return(snd_allo_piano_dsp_program(rtd, -@@ -366,23 +393,29 @@ static int pcm512x_get_reg_sub(struct snd_kcontrol *kcontrol, - struct soc_mixer_control *mc = - (struct soc_mixer_control *)kcontrol->private_value; - struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); -+ struct glb_pool *glb_ptr = card->drvdata; - struct snd_soc_pcm_runtime *rtd; - unsigned int left_val = 0; - unsigned int right_val = 0; - - rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -- left_val = snd_soc_read(rtd->codec_dais[1]->codec, -- PCM512x_DIGITAL_VOLUME_2); -- if (left_val < 0) -- return left_val; -- - right_val = snd_soc_read(rtd->codec_dais[1]->codec, - PCM512x_DIGITAL_VOLUME_3); - if (right_val < 0) - return right_val; - -+ if (glb_ptr->dual_mode != 1) { -+ left_val = snd_soc_read(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_2); -+ if (left_val < 0) -+ return left_val; -+ -+ } else { -+ left_val = right_val; -+ } -+ - ucontrol->value.integer.value[0] = -- (~(left_val >> mc->shift)) & mc->max; -+ (~(left_val >> mc->shift)) & mc->max; - ucontrol->value.integer.value[1] = - (~(right_val >> mc->shift)) & mc->max; - -@@ -395,16 +428,27 @@ static int pcm512x_set_reg_sub(struct snd_kcontrol *kcontrol, - struct soc_mixer_control *mc = - (struct soc_mixer_control *)kcontrol->private_value; - struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); -+ struct glb_pool *glb_ptr = card->drvdata; - struct snd_soc_pcm_runtime *rtd; - unsigned int left_val = (ucontrol->value.integer.value[0] & mc->max); - unsigned int right_val = (ucontrol->value.integer.value[1] & mc->max); - int ret = 0; - - rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -- ret = snd_soc_write(rtd->codec_dais[1]->codec, -- PCM512x_DIGITAL_VOLUME_2, (~left_val)); -- if (ret < 0) -- return ret; -+ if (glb_ptr->dual_mode != 1) { -+ ret = snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_2, (~left_val)); -+ if (ret < 0) -+ return ret; -+ } -+ -+ if (digital_gain_0db_limit) { -+ ret = snd_soc_limit_volume(card, "Subwoofer Playback Volume", -+ 207); -+ if (ret < 0) -+ dev_warn(card->dev, "Failed to set volume limit: %d\n", -+ ret); -+ } - - ret = snd_soc_write(rtd->codec_dais[1]->codec, - PCM512x_DIGITAL_VOLUME_3, (~right_val)); -@@ -426,8 +470,10 @@ static int pcm512x_get_reg_sub_switch(struct snd_kcontrol *kcontrol, - if (val < 0) - return val; - -- ucontrol->value.integer.value[0] = (val & 0x10) ? 0 : 1; -- ucontrol->value.integer.value[1] = (val & 0x01) ? 0 : 1; -+ ucontrol->value.integer.value[0] = -+ (val & P_DAC_LEFT_MUTE) ? P_UNMUTE : P_MUTE; -+ ucontrol->value.integer.value[1] = -+ (val & P_DAC_RIGHT_MUTE) ? P_UNMUTE : P_MUTE; - - return val; - } -@@ -437,21 +483,177 @@ static int pcm512x_set_reg_sub_switch(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; - unsigned int left_val = (ucontrol->value.integer.value[0]); - unsigned int right_val = (ucontrol->value.integer.value[1]); - int ret = 0; - - rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -- ret = snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, -- ~((left_val & 0x01)<<4 | (right_val & 0x01))); -+ if (glb_ptr->set_mode != 1) { -+ ret = snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, -+ ~((left_val & 0x01)<<4 | (right_val & 0x01))); -+ if (ret < 0) -+ return ret; -+ } -+ return 1; -+ -+} -+ -+static int pcm512x_get_reg_master(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct soc_mixer_control *mc = -+ (struct soc_mixer_control *)kcontrol->private_value; -+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); -+ struct glb_pool *glb_ptr = card->drvdata; -+ struct snd_soc_pcm_runtime *rtd; -+ unsigned int left_val = 0, right_val = 0; -+ -+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -+ -+ left_val = snd_soc_read(rtd->codec_dais[0]->codec, -+ PCM512x_DIGITAL_VOLUME_2); -+ if (left_val < 0) -+ return left_val; -+ -+ if (glb_ptr->dual_mode == 1) { -+ right_val = snd_soc_read(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_3); -+ if (right_val < 0) -+ return right_val; -+ } else { -+ right_val = snd_soc_read(rtd->codec_dais[0]->codec, -+ PCM512x_DIGITAL_VOLUME_3); -+ if (right_val < 0) -+ return right_val; -+ } -+ -+ ucontrol->value.integer.value[0] = -+ (~(left_val >> mc->shift)) & mc->max; -+ ucontrol->value.integer.value[1] = -+ (~(right_val >> mc->shift)) & mc->max; -+ -+ return 0; -+} -+ -+static int pcm512x_set_reg_master(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct soc_mixer_control *mc = -+ (struct soc_mixer_control *)kcontrol->private_value; -+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); -+ struct glb_pool *glb_ptr = card->drvdata; -+ struct snd_soc_pcm_runtime *rtd; -+ unsigned int left_val = (ucontrol->value.integer.value[0] & mc->max); -+ unsigned int right_val = (ucontrol->value.integer.value[1] & mc->max); -+ int ret = 0; -+ -+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -+ -+ if (digital_gain_0db_limit) { -+ ret = snd_soc_limit_volume(card, "Master Playback Volume", -+ 207); -+ if (ret < 0) -+ dev_warn(card->dev, "Failed to set volume limit: %d\n", -+ ret); -+ } -+ -+ if (glb_ptr->dual_mode != 1) { -+ ret = snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_2, (~left_val)); -+ if (ret < 0) -+ return ret; -+ -+ ret = snd_soc_write(rtd->codec_dais[0]->codec, -+ PCM512x_DIGITAL_VOLUME_3, (~right_val)); -+ if (ret < 0) -+ return ret; -+ -+ } -+ -+ ret = snd_soc_write(rtd->codec_dais[1]->codec, -+ PCM512x_DIGITAL_VOLUME_3, (~right_val)); - if (ret < 0) - return ret; - -+ ret = snd_soc_write(rtd->codec_dais[0]->codec, -+ PCM512x_DIGITAL_VOLUME_2, (~left_val)); -+ if (ret < 0) -+ return ret; - return 1; -+} -+ -+static int pcm512x_get_reg_master_switch(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; -+ int val = 0; -+ -+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -+ -+ val = snd_soc_read(rtd->codec_dais[0]->codec, PCM512x_MUTE); -+ if (val < 0) -+ return val; -+ -+ ucontrol->value.integer.value[0] = -+ (val & P_DAC_LEFT_MUTE) ? P_UNMUTE : P_MUTE; -+ -+ if (glb_ptr->dual_mode == 1) { -+ val = snd_soc_read(rtd->codec_dais[1]->codec, PCM512x_MUTE); -+ if (val < 0) -+ return val; -+ } -+ ucontrol->value.integer.value[1] = -+ (val & P_DAC_RIGHT_MUTE) ? P_UNMUTE : P_MUTE; -+ -+ return val; -+} -+ -+static int pcm512x_set_reg_master_switch(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); -+ struct snd_soc_pcm_runtime *rtd; -+ struct glb_pool *glb_ptr = card->drvdata; -+ unsigned int left_val = (ucontrol->value.integer.value[0]); -+ unsigned int right_val = (ucontrol->value.integer.value[1]); -+ int ret = 0; - -+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name); -+ if (glb_ptr->dual_mode == 1) { -+ ret = snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, -+ ~((left_val & 0x01)<<4)); -+ if (ret < 0) -+ return ret; -+ ret = snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, -+ ~((right_val & 0x01))); -+ if (ret < 0) -+ return ret; -+ -+ } else if (glb_ptr->set_mode == 1) { -+ ret = snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, -+ ~((left_val & 0x01)<<4 | (right_val & 0x01))); -+ if (ret < 0) -+ return ret; -+ -+ } else { -+ ret = snd_soc_write(rtd->codec_dais[0]->codec, PCM512x_MUTE, -+ ~((left_val & 0x01)<<4 | (right_val & 0x01))); -+ if (ret < 0) -+ return ret; -+ -+ ret = snd_soc_write(rtd->codec_dais[1]->codec, PCM512x_MUTE, -+ ~((left_val & 0x01)<<4 | (right_val & 0x01))); -+ if (ret < 0) -+ return ret; -+ } -+ return 1; - } - - static const DECLARE_TLV_DB_SCALE(digital_tlv_sub, -10350, 50, 1); -+static const DECLARE_TLV_DB_SCALE(digital_tlv_master, -10350, 50, 1); - - static const struct snd_kcontrol_new allo_piano_controls[] = { - SOC_ENUM_EXT("Subwoofer mode Route", -@@ -481,6 +683,20 @@ static const struct snd_kcontrol_new allo_piano_controls[] = { - PCM512x_RQMR_SHIFT, 1, 1, - pcm512x_get_reg_sub_switch, - pcm512x_set_reg_sub_switch), -+ -+ SOC_DOUBLE_R_EXT_TLV("Master Playback Volume", -+ PCM512x_DIGITAL_VOLUME_2, -+ PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, -+ pcm512x_get_reg_master, -+ pcm512x_set_reg_master, -+ digital_tlv_master), -+ -+ SOC_DOUBLE_EXT("Master Playback Switch", -+ PCM512x_MUTE, -+ PCM512x_RQML_SHIFT, -+ PCM512x_RQMR_SHIFT, 1, 1, -+ pcm512x_get_reg_master_switch, -+ pcm512x_set_reg_master_switch), - }; - - static int snd_allo_piano_dac_init(struct snd_soc_pcm_runtime *rtd) -@@ -494,6 +710,8 @@ static int snd_allo_piano_dac_init(struct snd_soc_pcm_runtime *rtd) - - memset(glb_ptr, 0x00, sizeof(glb_ptr)); - card->drvdata = glb_ptr; -+ glb_ptr->dual_mode = 2; -+ glb_ptr->set_mode = 0; - - mutex_init(&glb_ptr->lock); - -@@ -506,26 +724,25 @@ static int snd_allo_piano_dac_init(struct snd_soc_pcm_runtime *rtd) - dev_warn(card->dev, "Failed to set volume limit: %d\n", - ret); - } -- - return 0; - } - - static void snd_allo_piano_gpio_mute(struct snd_soc_card *card) - { - if (mute_gpio[0]) -- gpiod_set_value_cansleep(mute_gpio[0], 1); -+ gpiod_set_value_cansleep(mute_gpio[0], P_MUTE); - - if (mute_gpio[1]) -- gpiod_set_value_cansleep(mute_gpio[1], 1); -+ gpiod_set_value_cansleep(mute_gpio[1], P_MUTE); - } - - static void snd_allo_piano_gpio_unmute(struct snd_soc_card *card) - { - if (mute_gpio[0]) -- gpiod_set_value_cansleep(mute_gpio[0], 0); -+ gpiod_set_value_cansleep(mute_gpio[0], P_UNMUTE); - - if (mute_gpio[1]) -- gpiod_set_value_cansleep(mute_gpio[1], 0); -+ gpiod_set_value_cansleep(mute_gpio[1], P_UNMUTE); - } - - static int snd_allo_piano_set_bias_level(struct snd_soc_card *card, -@@ -617,14 +834,6 @@ static int snd_allo_piano_dac_hw_params( - } - } - -- if (digital_gain_0db_limit) { -- ret = snd_soc_limit_volume(card, -- "Subwoofer Playback Volume", 207); -- if (ret < 0) -- 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) - -From 86207f0432f35b7ecc8c2ab13ea5212b5fc8e57e Mon Sep 17 00:00:00 2001 -From: allocom -Date: Sat, 5 Aug 2017 11:27:07 +0530 -Subject: [PATCH 155/170] allo-digione: 192kHz clicking sound fix - -See: https://github.com/raspberrypi/linux/pull/2149 ---- - sound/soc/bcm/allo-digione.c | 113 +++++++++++++++++++++---------------------- - 1 file changed, 55 insertions(+), 58 deletions(-) - -diff --git a/sound/soc/bcm/allo-digione.c b/sound/soc/bcm/allo-digione.c -index e3664e44c699d0102120ecf99e8b780a4505ebad..9387b055875fdf92a13dc4a9d2727f959dd0f2f9 100644 ---- a/sound/soc/bcm/allo-digione.c -+++ b/sound/soc/bcm/allo-digione.c -@@ -28,7 +28,7 @@ - - #include "../codecs/wm8804.h" - --static short int auto_shutdown_output = 0; -+static short int auto_shutdown_output; - 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"); -@@ -75,6 +75,7 @@ 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; - } -@@ -86,6 +87,7 @@ static void snd_allo_digione_shutdown(struct snd_pcm_substream *substream) - /* 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); - } - } -@@ -107,43 +109,37 @@ static int snd_allo_digione_hw_params(struct snd_pcm_substream *substream, - 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; -- } -+ mclk_freq = samplerate * 256; -+ mclk_div = WM8804_MCLKDIV_256FS; - - 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); -+ 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); -@@ -173,8 +169,8 @@ static int snd_allo_digione_hw_params(struct snd_pcm_substream *substream, - /* 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, -+ .startup = snd_allo_digione_startup, -+ .shutdown = snd_allo_digione_shutdown, - }; - - static struct snd_soc_dai_link snd_allo_digione_dai[] = { -@@ -209,27 +205,28 @@ static int snd_allo_digione_probe(struct platform_device *pdev) - 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"); -+ 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); - -From 4662e21235b9031c6be1aa634b81111f3136d872 Mon Sep 17 00:00:00 2001 -From: Daniel Matuschek -Date: Tue, 17 Oct 2017 10:30:28 +0200 -Subject: [PATCH 156/170] Fixed a bug when using 352.8kHz sample rate - -Signed-off-by: Daniel Matuschek ---- - sound/soc/bcm/hifiberry_dacplus.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c -index b7b401cbe2b0d510d8b12d2dda6d5ff1fff42eb0..16697dd6c6db6856022731a07a9a1653dd94b9f5 100644 ---- a/sound/soc/bcm/hifiberry_dacplus.c -+++ b/sound/soc/bcm/hifiberry_dacplus.c -@@ -117,6 +117,7 @@ static int snd_rpi_hifiberry_dacplus_clk_for_rate(int sample_rate) - case 44100: - case 88200: - case 176400: -+ case 352800: - type = HIFIBERRY_DACPRO_CLK44EN; - break; - default: - -From 257245b8b8a81d150be17f06d4962f5c89834358 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 1 Nov 2017 12:24:28 +0000 -Subject: [PATCH 157/170] ARM: dts: Add fake CTS signal to pi3-miniuart-bt - -The Pi 3B rev 1.3 and the Pi Zero W have flow control signals to the -BT modem, which work well using UART0 (a.k.a. ttyAMA0). Because of -this, the pin wired to the modem's CTS line has to be held low in -order for it to transmit data. - -Unfortunately the mini-UART (or its driver) appears to have a flow -control issue, causing hciattach to stall during modem initialisation. - -As a workaround (potentially short-term), configure GPIO 31 as an -output driving low (the default state for an output). - -See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=138223&start=100#p1228339 - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -index 18f77453c38dbbf33f3726a5b4cce15b9f20f390..98381656945f5b84d96b9e496366b99109b4fbe7 100644 ---- a/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -+++ b/arch/arm/boot/dts/overlays/pi3-miniuart-bt-overlay.dts -@@ -31,7 +31,7 @@ - target = <&uart1>; - __overlay__ { - pinctrl-names = "default"; -- pinctrl-0 = <&uart1_pins &bt_pins>; -+ pinctrl-0 = <&uart1_pins &bt_pins &fake_bt_cts>; - status = "okay"; - }; - }; -@@ -55,6 +55,16 @@ - }; - - fragment@4 { -+ target = <&gpio>; -+ __overlay__ { -+ fake_bt_cts: fake_bt_cts { -+ brcm,pins = <31>; -+ brcm,function = <1>; /* output */ -+ }; -+ }; -+ }; -+ -+ fragment@5 { - target-path = "/aliases"; - __overlay__ { - serial0 = "/soc/serial@7e201000"; - -From 51fbca7f78997001efb144ce93048a3db5103242 Mon Sep 17 00:00:00 2001 +From 69fd01ea204909f8649779598e42d16620e76dba Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 14 Nov 2017 11:03:22 +0000 -Subject: [PATCH 158/170] mcp2515: Use DT-supplied interrupt flags +Subject: [PATCH 141/150] mcp2515: Use DT-supplied interrupt flags The MCP2515 datasheet clearly describes a level-triggered interrupt pin. Therefore the receiving interrupt controller must also be @@ -138666,37 +137272,9 @@ See: https://github.com/raspberrypi/linux/issues/2175 Signed-off-by: Phil Elwell --- - arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts | 2 +- - arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts | 2 +- - drivers/net/can/spi/mcp251x.c | 3 +++ - 3 files changed, 5 insertions(+), 2 deletions(-) + drivers/net/can/spi/mcp251x.c | 3 +++ + 1 file changed, 3 insertions(+) -diff --git a/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts -index c96cdae27fb15055c4a6ec55d1ee45644768c392..03eb5486fa9c4cdb74cfc7a228dc7cea0105b8b5 100755 ---- a/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts -+++ b/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts -@@ -60,7 +60,7 @@ - pinctrl-0 = <&can0_pins>; - spi-max-frequency = <10000000>; - interrupt-parent = <&gpio>; -- interrupts = <25 0x2>; -+ interrupts = <25 8>; /* IRQ_TYPE_LEVEL_LOW */ - clocks = <&can0_osc>; - }; - }; -diff --git a/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts -index 67bd0d9bdaa2ff767d284010a69ecfe3f2aa1fd1..dc773fa3b50cea849ffede35f42d30175c11718c 100644 ---- a/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts -+++ b/arch/arm/boot/dts/overlays/mcp2515-can1-overlay.dts -@@ -60,7 +60,7 @@ - pinctrl-0 = <&can1_pins>; - spi-max-frequency = <10000000>; - interrupt-parent = <&gpio>; -- interrupts = <25 0x2>; -+ interrupts = <25 8>; /* IRQ_TYPE_LEVEL_LOW */ - clocks = <&can1_osc>; - }; - }; diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c index f3f05fea8e1f8e0ad3a1ebd7461d2019835e1d47..6c2d3aba25918f5536b2d67292334e746df06c5e 100644 --- a/drivers/net/can/spi/mcp251x.c @@ -138712,553 +137290,10 @@ index f3f05fea8e1f8e0ad3a1ebd7461d2019835e1d47..6c2d3aba25918f5536b2d67292334e74 flags | IRQF_ONESHOT, DEVICE_NAME, priv); if (ret) { -From 3d0ed1cf2cfccf3b0ab57bb1ad5cd17d3b956cb7 Mon Sep 17 00:00:00 2001 -From: Eric Cooper -Date: Sat, 29 Jul 2017 15:52:58 -0400 -Subject: [PATCH 159/170] overlays: i2c-rtc: add m41t62 - -Add support for the ST M41T62 real-time clock chip. ---- - arch/arm/boot/dts/overlays/README | 2 ++ - arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 19 ++++++++++++++++++- - 2 files changed, 20 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 6f6daf2164add0af2363befec3ec521b367c402e..77204d1fe09028ba5c6e50583a96eb5cafa8008a 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -689,6 +689,8 @@ Params: abx80x Select one of the ABx80x family: - - ds3231 Select the DS3231 device - -+ m41t62 Select the M41T62 device -+ - mcp7940x Select the MCP7940x device - - mcp7941x Select the MCP7941x device -diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -index 6140f172a86b8731782f938f76cb5dac9f28b662..fcb846a50d19cb97fc73de8b801962ac96416c20 100644 ---- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -+++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts -@@ -143,6 +143,21 @@ - }; - }; - -+ fragment@9 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ m41t62: m41t62@68 { -+ compatible = "st,m41t62"; -+ reg = <0x68>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ - __overrides__ { - abx80x = <0>,"+0"; - ds1307 = <0>,"+1"; -@@ -153,12 +168,14 @@ - pcf2127 = <0>,"+6"; - pcf8523 = <0>,"+7"; - pcf8563 = <0>,"+8"; -+ m41t62 = <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?"; -+ <&mcp7941x>,"wakeup-source?", -+ <&m41t62>,"wakeup-source?"; - }; - }; - -From 8ada29ec6211b14d0b2497f3ea6da939d0c68741 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 16 Aug 2017 16:52:50 +0100 -Subject: [PATCH 160/170] BCM270X_DT: Set spidev spi-max-frequency to 125MHz - -The BCM2835 SPI controllers have a maximum bus clock of half the system -clock speed, so with the 250MHz system clock found on Raspberry Pis -you get a theoretical maximum bus speed of 125MHz. Note that this -speed is unlikely to be reliable, and the maximum usable bus spee will -depend on both the attached device and the wiring. - -See: https://github.com/raspberrypi/linux/issues/2165 -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 4 ++-- - arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 4 ++-- - arch/arm/boot/dts/bcm2708-rpi-b.dts | 4 ++-- - arch/arm/boot/dts/bcm2708-rpi-cm.dts | 4 ++-- - arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 4 ++-- - arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ++-- - arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 4 ++-- - arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts | 2 +- - arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts | 4 ++-- - arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts | 6 +++--- - arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts | 2 +- - arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts | 4 ++-- - arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts | 6 +++--- - 13 files changed, 26 insertions(+), 26 deletions(-) - -diff --git a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts -index a6ef9ee67ef8ca7eb88808bc9afcd89ce3af1f0d..8299f8a4e2a436f443e9c95c468583d538787c0f 100644 ---- a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts -+++ b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts -@@ -101,7 +101,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - - spidev1: spidev@1{ -@@ -109,7 +109,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - }; - -diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts -index 373bfd02786c6d912c3fc5ebb2f3dcebb5ebf82b..31db4fd917a40d949acbabfc9ae1367f85933f9a 100644 ---- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts -+++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts -@@ -53,7 +53,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - - spidev1: spidev@1{ -@@ -61,7 +61,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - }; - -diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts -index 7e5151ad52a661f482b1de355210b5587417e87c..ffe5d14feb9f671b6a574c55c115e331fac22c4d 100644 ---- a/arch/arm/boot/dts/bcm2708-rpi-b.dts -+++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts -@@ -53,7 +53,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - - spidev1: spidev@1{ -@@ -61,7 +61,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - }; - -diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -index 935867a7bb46addd9e205f93cb9db45b92722fa3..0b0d23256edd74fca11a0e6479f4d048aec75717 100644 ---- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts -+++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts -@@ -52,7 +52,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - - spidev1: spidev@1{ -@@ -60,7 +60,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - }; - -diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -index 434c451928b4830530d008d9c9ede9b0fc0c1b92..b7d48347066597e5d1e183e7c58330daf12f4e9b 100644 ---- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts -@@ -53,7 +53,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - - spidev1: spidev@1{ -@@ -61,7 +61,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - }; - -diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -index e032516ffd351a4099d150767a112f195d678b5a..a72c2fed5c52444fbc80daf23e1bf8f7c6f70e7f 100644 ---- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts -@@ -125,7 +125,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - - spidev1: spidev@1{ -@@ -133,7 +133,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - }; - -diff --git a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts -index a84552eca6a54dafd6d016dfb60e9d4ce064041f..2500641c14dc3f01421351738b1e0f01ad73772d 100644 ---- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts -+++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts -@@ -70,7 +70,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - - spidev1: spidev@1{ -@@ -78,7 +78,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - }; - }; - -diff --git a/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts -index 71c243947004fa887998065df9c259b50edfa428..c3d4f96b7aa92cd679cc8abc7c7aea1dc7c84eb6 100644 ---- a/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts -+++ b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts -@@ -36,7 +36,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - }; -diff --git a/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts -index 2ae0885cf1e7fb7420f65e538310ab1addafbece..2ad62497dc895c6253c2a03b45e726e4f882d170 100644 ---- a/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts -+++ b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts -@@ -36,7 +36,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - -@@ -45,7 +45,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - }; -diff --git a/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts -index 8f79044cd8f47ea055394822cc380497c985c7e5..ef82890453bfe36afd124f6a01f4ca5116b809d4 100644 ---- a/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts -+++ b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts -@@ -36,7 +36,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - -@@ -45,7 +45,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - -@@ -54,7 +54,7 @@ - reg = <2>; /* CE2 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - }; -diff --git a/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts -index 6f57bc710fe123028a5a216063733f0cea9bbd54..761b6be4ff9b55da1bf3979c905a3cc8d87ca6fb 100644 ---- a/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts -+++ b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts -@@ -36,7 +36,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - }; -diff --git a/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts -index d090631d36821b0c89833b9f217216f0b134a8f3..e533aba113deddd35ed3f9f6628eb130f1e09095 100644 ---- a/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts -+++ b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts -@@ -36,7 +36,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - -@@ -45,7 +45,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - }; -diff --git a/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts -index e2586728c311829462f6a4b3b348e35603f033ce..a62e107dc98fa484bcaad7f8caddfca450d0aea6 100644 ---- a/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts -+++ b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts -@@ -36,7 +36,7 @@ - reg = <0>; /* CE0 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - -@@ -45,7 +45,7 @@ - reg = <1>; /* CE1 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - -@@ -54,7 +54,7 @@ - reg = <2>; /* CE2 */ - #address-cells = <1>; - #size-cells = <0>; -- spi-max-frequency = <500000>; -+ spi-max-frequency = <125000000>; - status = "okay"; - }; - }; - -From 0dfd232829957c49006f533c3d98a9d8e8c0837f Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 24 May 2017 18:06:02 +0100 -Subject: [PATCH 161/170] Revert "hid: Reduce default mouse polling interval to - 60Hz" - -This reverts commit b45c0448b60d691508251cdccf242ea43bbabb14. ---- - drivers/hid/usbhid/hid-core.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c -index 45abcbab4efe561a3829e9a6b6014abeb7d7797d..045b5da9b992873ce74f5d401de34855b93a6f8e 100644 ---- a/drivers/hid/usbhid/hid-core.c -+++ b/drivers/hid/usbhid/hid-core.c -@@ -48,7 +48,7 @@ - * Module parameters. - */ - --static unsigned int hid_mousepoll_interval = ~0; -+static unsigned int hid_mousepoll_interval; - module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); - MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); - -@@ -1098,9 +1098,7 @@ static int usbhid_start(struct hid_device *hid) - /* Change the polling interval of mice and joysticks. */ - switch (hid->collection->usage) { - case HID_GD_MOUSE: -- if (hid_mousepoll_interval == ~0 && interval < 16) -- interval = 16; -- else if (hid_mousepoll_interval != ~0 && hid_mousepoll_interval != 0) -+ if (hid_mousepoll_interval > 0) - interval = hid_mousepoll_interval; - break; - case HID_GD_JOYSTICK: - -From 7f59d7484db956dd2c610fafecebe57a17047841 Mon Sep 17 00:00:00 2001 -From: Gerald Pape -Date: Wed, 1 Nov 2017 11:15:32 +0100 -Subject: [PATCH 162/170] Include tsl4531, veml6070 and hdc100x dtoverlay - (#2252) - -This commit adds the needed kernel config keys and extends the -i2c-sensor-overlay.dts file with support for: -* the Texas Instruments HDC100x temp sensor -* the AMS TSL4531 digital ambient light sensor -* the Vishay VEML6070 ultraviolet light sensor ---- - arch/arm/boot/dts/overlays/README | 13 +++++- - arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 50 ++++++++++++++++++++++- - 2 files changed, 60 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 77204d1fe09028ba5c6e50583a96eb5cafa8008a..708d4e4baa8ed70c29d8ad6381fdab0e8ea33bb5 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -756,8 +756,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, TMP102 -- or LM75 -+Params: addr Set the address for the BME280, BMP280, TMP102, -+ HDC100X or LM75 - - bme280 Select the Bosch Sensortronic BME280 - Valid addresses 0x76-0x77, default 0x76 -@@ -769,6 +769,9 @@ Params: addr Set the address for the BME280, BMP280, TMP102 - bmp280 Select the Bosch Sensortronic BMP280 - Valid addresses 0x76-0x77, default 0x76 - -+ hdc100x Select the Texas Instruments HDC100x temp sensor -+ Valid addresses 0x40-0x43, default 0x40 -+ - htu21 Select the HTU21 temperature and humidity sensor - - lm75 Select the Maxim LM75 temperature sensor -@@ -782,6 +785,12 @@ Params: addr Set the address for the BME280, BMP280, TMP102 - tmp102 Select the Texas Instruments TMP102 temp sensor - Valid addresses 0x48-0x4b, default 0x48 - -+ tsl4531 Select the AMS TSL4531 digital ambient light -+ sensor -+ -+ veml6070 Select the Vishay VEML6070 ultraviolet light -+ sensor -+ - - 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 17c27e3b666a7a83619471b50c63bb93836653c5..28e6fa3b659d90b4fdfcc52df37e870572731235 100644 ---- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -@@ -126,9 +126,54 @@ - }; - }; - -+ fragment@8 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ hdc100x: hdc100x@40 { -+ compatible = "hdc100x"; -+ reg = <0x40>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@9 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ tsl4531: tsl4531@29 { -+ compatible = "tsl4531"; -+ reg = <0x29>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ -+ fragment@10 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ veml6070: veml6070@38 { -+ compatible = "veml6070"; -+ reg = <0x38>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ - __overrides__ { - addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0", -- <&lm75>,"reg:0"; -+ <&lm75>,"reg:0",<&hdc100x>,"reg:0"; - bme280 = <0>,"+0"; - bmp085 = <0>,"+1"; - bmp180 = <0>,"+2"; -@@ -138,5 +183,8 @@ - lm75addr = <&lm75>,"reg:0"; - si7020 = <0>,"+6"; - tmp102 = <0>,"+7"; -+ hdc100x = <0>,"+8"; -+ tsl4531 = <0>,"+9"; -+ veml6070 = <0>,"+10"; - }; - }; - -From 164284ae25f239d212618fbaaea4132a229a6285 Mon Sep 17 00:00:00 2001 +From ff2e9be866351ffd2c540c1f4f7666bbe707c76b Mon Sep 17 00:00:00 2001 From: James Hughes Date: Thu, 16 Nov 2017 15:56:17 +0000 -Subject: [PATCH 163/170] Tidy up of the ft5406 driver to use DT (#2189) +Subject: [PATCH 142/150] Tidy up of the ft5406 driver to use DT (#2189) Driver was using a fixed resolution, this commit adds touchscreen size, and coordinate flip and swap @@ -139271,55 +137306,9 @@ if required. Signed-off-by: James Hughes --- - arch/arm/boot/dts/overlays/README | 8 +- - arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts | 13 ++ - drivers/input/touchscreen/rpi-ft5406.c | 218 ++++++++++++++-------- - 3 files changed, 164 insertions(+), 75 deletions(-) + drivers/input/touchscreen/rpi-ft5406.c | 218 ++++++++++++++++++++++----------- + 1 file changed, 145 insertions(+), 73 deletions(-) -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 708d4e4baa8ed70c29d8ad6381fdab0e8ea33bb5..608b68fb7dad22290320f63ec340617453e58187 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -1299,8 +1299,12 @@ Params: speed Display SPI bus speed - - Name: rpi-ft5406 - Info: Official Raspberry Pi display touchscreen --Load: dtoverlay=rpi-ft5406 --Params: -+Load: dtoverlay=rpi-ft5406,= -+Params: touchscreen-size-x Touchscreen X resolution (default 800) -+ touchscreen-size-y Touchscreen Y resolution (default 600); -+ touchscreen-inverted-x Invert touchscreen X coordinates (default 0); -+ touchscreen-inverted-y Invert touchscreen Y coordinates (default 0); -+ touchscreen-swapped-x-y Swap X and Y cordinates (default 0); - - - Name: rpi-proto -diff --git a/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts b/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts -index 2e53a17491706bdb6245426b548a54960a40966f..d4607b9d1cbfc38c6dd8b504aa00921d9590f6da 100644 ---- a/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts -+++ b/arch/arm/boot/dts/overlays/rpi-ft5406-overlay.dts -@@ -11,7 +11,20 @@ - compatible = "rpi,rpi-ft5406"; - firmware = <&firmware>; - status = "okay"; -+ touchscreen-size-x = <800>; -+ touchscreen-size-y = <600>; -+ touchscreen-inverted-x = <0>; -+ touchscreen-inverted-y = <0>; -+ touchscreen-swapped-x-y = <0>; - }; - }; - }; -+ -+ __overrides__ { -+ touchscreen-size-x = <&rpi_ft5406>,"touchscreen-size-x:0"; -+ touchscreen-size-y = <&rpi_ft5406>,"touchscreen-size-y:0"; -+ touchscreen-inverted-x = <&rpi_ft5406>,"touchscreen-inverted-x:0"; -+ touchscreen-inverted-y = <&rpi_ft5406>,"touchscreen-inverted-y:0"; -+ touchscreen-swapped-x-y = <&rpi_ft5406>,"touchscreen-swapped-x-y:0"; -+ }; - }; diff --git a/drivers/input/touchscreen/rpi-ft5406.c b/drivers/input/touchscreen/rpi-ft5406.c index 9d7d05482355d168c5c0c42508cd978979ee5f14..40bbde9ce1bc4c51be50f47fc359c74f49c5e9ba 100644 --- a/drivers/input/touchscreen/rpi-ft5406.c @@ -139688,10 +137677,10 @@ index 9d7d05482355d168c5c0c42508cd978979ee5f14..40bbde9ce1bc4c51be50f47fc359c74f } -From f3343f2d84b8fba6899f4708a843093470e9cd9a Mon Sep 17 00:00:00 2001 +From d48a2cbe69d3b552b30d82140b62248db79460b9 Mon Sep 17 00:00:00 2001 From: notro Date: Thu, 10 Jul 2014 13:59:47 +0200 -Subject: [PATCH 164/170] pinctrl-bcm2835: Set base to 0 give expected gpio +Subject: [PATCH 143/150] pinctrl-bcm2835: Set base to 0 give expected gpio numbering Signed-off-by: Noralf Tronnes @@ -139713,10 +137702,10 @@ index ff782445dfb75d1a8af9eed775b8e8f7b275fee3..786efcddb5e56a06baf67cb91ddbbd8e .can_sleep = false, }; -From 3e5e273d8feda981f036defb43e1cadc6bc65a35 Mon Sep 17 00:00:00 2001 +From 73f55096e293319c764fb653fd67c29d0faa019b Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 24 Nov 2017 13:49:26 +0000 -Subject: [PATCH 165/170] fiq_fsm: rewind DMA pointer for OUT transactions that +Subject: [PATCH 144/150] fiq_fsm: rewind DMA pointer for OUT transactions that fail (#2288) See: https://github.com/raspberrypi/linux/issues/2140 @@ -139760,10 +137749,10 @@ index e47d5b6de3ada73896ff9a81abd223d345e0de4f..ec804c7cd06d2db897ce6f72fce29733 if (st->nr_errors >= 3) { st->fsm = FIQ_NP_SPLIT_HS_ABORTED; -From df143593fe0a7d80e4dfe9e0f7e18f4b97e79832 Mon Sep 17 00:00:00 2001 +From ceeab80e8fad0008e4a64ac641dfa245b483597e Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Fri, 21 Jul 2017 11:30:18 +0100 -Subject: [PATCH 166/170] lan78xx: Read MAC address from DT if present +Subject: [PATCH 145/150] lan78xx: Read MAC address from DT if present There is a standard mechanism for locating and using a MAC address from the Device Tree. Use this facility in the lan78xx driver to support @@ -139810,10 +137799,10 @@ index 0161f77641fac8eafc1284a5457a7ccb273efc39..01e72b267de8f2a82fbe1ab4557dcaab (addr[2] << 16) | (addr[3] << 24); addr_hi = addr[4] | (addr[5] << 8); -From 5cf807262531004e6cdbf7b443c7c06b5c4e613c Mon Sep 17 00:00:00 2001 +From 808a641b3d4d37114b4cef891e2338719dd99726 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 28 Nov 2017 12:02:37 +0000 -Subject: [PATCH 167/170] lan78xx: Correctly indicate invalid OTP +Subject: [PATCH 146/150] lan78xx: Correctly indicate invalid OTP lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP content, but the value gets overwritten before it is returned and the @@ -139840,41 +137829,61 @@ index 01e72b267de8f2a82fbe1ab4557dcaab67532da9..126fe75e75b19c1076a7dd4415a90403 return ret; -From 5ef99b48da33f6e2201725c69b292a0f9457605c Mon Sep 17 00:00:00 2001 +From c5282e16966e858bb264a98476add4b1e4183bc6 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 17 Oct 2017 15:04:29 +0100 -Subject: [PATCH 168/170] lan78xx: Enable LEDs if no valid EEPROM or OTP +Subject: [PATCH 147/150] lan78xx: Enable LEDs and auto-negotiation For applications of the LAN78xx that don't have valid programmed -EEPROMs or OTPs, enabling both LEDs by default seems reasonable. +EEPROMs or OTPs, enabling both LEDs and auto-negotiation by default +seems reasonable. Signed-off-by: Phil Elwell --- - drivers/net/usb/lan78xx.c | 6 ++++++ - 1 file changed, 6 insertions(+) + drivers/net/usb/lan78xx.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c -index 126fe75e75b19c1076a7dd4415a904035ba95402..2f294d4a930058afdaac057bf6175b0bfd89ec14 100644 +index 126fe75e75b19c1076a7dd4415a904035ba95402..26e04c732df49d09939d470c61a9ab4638901e81 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c -@@ -2414,6 +2414,12 @@ static int lan78xx_reset(struct lan78xx_net *dev) +@@ -2362,6 +2362,11 @@ static int lan78xx_reset(struct lan78xx_net *dev) + u32 buf; + int ret = 0; + unsigned long timeout; ++ bool has_eeprom; ++ bool has_otp; ++ ++ has_eeprom = !lan78xx_read_eeprom(dev, 0, 0, NULL); ++ has_otp = !lan78xx_read_otp(dev, 0, 0, NULL); + + ret = lan78xx_read_reg(dev, HW_CFG, &buf); + buf |= HW_CFG_LRST_; +@@ -2414,6 +2419,9 @@ static int lan78xx_reset(struct lan78xx_net *dev) ret = lan78xx_read_reg(dev, HW_CFG, &buf); buf |= HW_CFG_MEF_; -+ + /* If no valid EEPROM and no valid OTP, enable the LEDs by default */ -+ if (lan78xx_read_eeprom(dev, 0, 0, NULL) && -+ lan78xx_read_otp(dev, 0, 0, NULL)) ++ if (!has_eeprom && !has_otp) + buf |= HW_CFG_LED0_EN_ | HW_CFG_LED1_EN_; -+ ret = lan78xx_write_reg(dev, HW_CFG, buf); ret = lan78xx_read_reg(dev, USB_CFG0, &buf); +@@ -2460,6 +2468,9 @@ static int lan78xx_reset(struct lan78xx_net *dev) + /* LAN7801 only has RGMII mode */ + if (dev->chipid == ID_REV_CHIP_ID_7801_) + buf &= ~MAC_CR_GMII_EN_; ++ /* If no valid EEPROM and no valid OTP, enable AUTO negotiation */ ++ if (!has_eeprom && !has_otp) ++ buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_; + ret = lan78xx_write_reg(dev, MAC_CR, buf); + + ret = lan78xx_read_reg(dev, MAC_TX, &buf); -From d8a8c6203e70d06ad764ed8a6f937c3b23fe190d Mon Sep 17 00:00:00 2001 +From 88e072ff870f14e523a595737deeb86f11006daf Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Mon, 27 Nov 2017 17:14:54 +0000 -Subject: [PATCH 169/170] cgroup: Disable cgroup "memory" by default +Subject: [PATCH 148/150] cgroup: Disable cgroup "memory" by default Some Raspberry Pis have limited RAM and most users won't use the cgroup memory support so it is disabled by default. Enable with: @@ -139944,76 +137953,75 @@ index 44857278eb8aa6a2bbf27b7eb12137ef42628170..8f86a3d88d84ccf4b055e6d36835fffa * css_tryget_online_from_dir - get corresponding css from a cgroup dentry * @dentry: directory dentry of interest -From 30befc9f036188098c858c94b2ba9fd058e6ea27 Mon Sep 17 00:00:00 2001 -From: Gerald Pape -Date: Tue, 21 Nov 2017 15:32:11 +0100 -Subject: [PATCH 170/170] enable sht3x module in kernel, add sht3x definition - to i2c-sensor dts definition (#2282) +From ab009e7091d475269815e4226b9289cd251a8217 Mon Sep 17 00:00:00 2001 +From: Allen Wild +Date: Tue, 26 Sep 2017 19:37:44 +0200 +Subject: [PATCH 149/150] thermal: enable broadcom menu for arm64 bcm2835 -Enable sht3x module in kernel configuration, and add to i2c-sensor overlay. +Moving the bcm2835 thermal driver to the broadcom directory prevented it +from getting enabled for arm64 builds, since the broadcom directory is only +available when 32-bit specific ARCH_BCM is set. + +Fix this by enabling the Broadcom menu for ARCH_BCM or ARCH_BCM2835. + +Fixes: 6892cf07e733 ("thermal: bcm2835: move to the broadcom subdirectory") +Reviewed-by: Eric Anholt +Signed-off-by: Allen Wild +Signed-off-by: Stefan Wahren +Signed-off-by: Eduardo Valentin --- - arch/arm/boot/dts/overlays/README | 6 +++++- - arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 18 +++++++++++++++++- - 2 files changed, 22 insertions(+), 2 deletions(-) + drivers/thermal/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README -index 608b68fb7dad22290320f63ec340617453e58187..8f2da2ab4e1858e60b403a21c29b23caf69c3c61 100644 ---- a/arch/arm/boot/dts/overlays/README -+++ b/arch/arm/boot/dts/overlays/README -@@ -757,7 +757,7 @@ 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, TMP102, -- HDC100X or LM75 -+ HDC100X, LM75 or SHT3x +diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig +index 07002df4f83acdde2efdf3f51299976ef25d2e1e..e3f0d1fd1720355bc601e766356ac5289e644b8d 100644 +--- a/drivers/thermal/Kconfig ++++ b/drivers/thermal/Kconfig +@@ -408,7 +408,7 @@ config MTK_THERMAL + controller present in Mediatek SoCs - bme280 Select the Bosch Sensortronic BME280 - Valid addresses 0x76-0x77, default 0x76 -@@ -791,6 +791,10 @@ Params: addr Set the address for the BME280, BMP280, TMP102, - veml6070 Select the Vishay VEML6070 ultraviolet light - sensor + menu "Broadcom thermal drivers" +-depends on ARCH_BCM || COMPILE_TEST ++depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST + source "drivers/thermal/broadcom/Kconfig" + endmenu -+ sht3x Select the Sensiron SHT3x temperature and -+ humidity sensor. Valid addresses 0x44-0x45, -+ default 0x44 -+ + +From 6ee7ffbe5160fc1c95938dbd133ef2edf6f33e14 Mon Sep 17 00:00:00 2001 +From: Gottfried Haider +Date: Tue, 26 Sep 2017 11:59:51 +0000 +Subject: [PATCH 150/150] pwm: Set class for exported channels in sysfs + +[ Upstream commit 7e5d1fd75c3dde9fc10c4472b9368089d1b81d00 ] + +Notifications for devices without bus or class set get dropped by +dev_uevent_filter(). Adding the class to the exported child matches +what the GPIO subsystem is doing. + +With this change exporting a channel triggers a udev event, which +gives userspace a chance to fixup permissions and makes it possible +for non-root users to make use of the PWM subsystem. + +Signed-off-by: Gottfried Haider +CC: Thierry Reding +CC: H Hartley Sweeten +CC: linux-pwm@vger.kernel.org +CC: linux-arm-kernel@lists.infradead.org +CC: linux-rpi-kernel@lists.infradead.org +Signed-off-by: Thierry Reding +--- + drivers/pwm/sysfs.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c +index a813239300c3d46bba1320caac77ec7adc8363a8..83f2b0b15712bf5745a0dc3a231c5ed0a817fdcd 100644 +--- a/drivers/pwm/sysfs.c ++++ b/drivers/pwm/sysfs.c +@@ -263,6 +263,7 @@ static int pwm_export_child(struct device *parent, struct pwm_device *pwm) + export->pwm = pwm; + mutex_init(&export->lock); - 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 28e6fa3b659d90b4fdfcc52df37e870572731235..0b9bc8ff9dd2f192c17cd92da248f7a3d4e4fc66 100644 ---- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts -@@ -171,9 +171,24 @@ - }; - }; - -+ fragment@11 { -+ target = <&i2c_arm>; -+ __dormant__ { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ sht3x: sht3x@44 { -+ compatible = "sht3x"; -+ reg = <0x44>; -+ status = "okay"; -+ }; -+ }; -+ }; -+ - __overrides__ { - addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0", -- <&lm75>,"reg:0",<&hdc100x>,"reg:0"; -+ <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0"; - bme280 = <0>,"+0"; - bmp085 = <0>,"+1"; - bmp180 = <0>,"+2"; -@@ -186,5 +201,6 @@ - hdc100x = <0>,"+8"; - tsl4531 = <0>,"+9"; - veml6070 = <0>,"+10"; -+ sht3x = <0>,"+11"; - }; - }; ++ export->child.class = parent->class; + export->child.release = pwm_export_release; + export->child.parent = parent; + export->child.devt = MKDEV(0, 0);