aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/files-5.10/drivers
Commit message (Collapse)AuthorAgeFilesLines
* generic: move ledbar driver from mediatek targetSven Wegener2022-09-181-255/+0
| | | | | | | This moves the ledbar driver to generic, to be also used by the ramips target. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> (cherry picked from commit 53fc987b25524c28525313347f0e2e5653dce43c)
* mediatek: add led countSven Wegener2022-09-181-1/+7
| | | | | | | | | | The LEDs connected to the MCU are so-called smart LEDs and their signal is daisy-chained. Because of this, the MCU needs to be told how many LEDs are connected. It also means the LEDs could be individually controlled, if the MCU has a command for this. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> (cherry picked from commit 76198e8f09a607c6aca2621f59d7a4cd7f6653e3)
* mediatek: add initialization after resetSven Wegener2022-09-181-0/+14
| | | | | | | | | During GPIO initialization the pin state flips and triggers a reset of the ledbar MCU. It needs to be moved through an initialization sequence before working correctly. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> (cherry picked from commit 013a956f086dc5d88f6e9cbd852ed4d900d436e0)
* mediatek: add support for reset gpioSven Wegener2022-09-181-0/+26
| | | | | | | | Some versions of the ledbar MCU have a reset pin. It needs to be correctly initialized or we might keep the MCU in reset state. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> (cherry picked from commit 84e4bbf5f049cdb862eb25c446bd6973ed4238aa)
* mediatek: support reading more than one byte of responseSven Wegener2022-09-181-7/+8
| | | | | | | There are commands that return more than one byte of response. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> (cherry picked from commit 7c852e7df50e370b26b060c96c3cc4491cee88eb)
* mediatek: cast literal value to charSven Wegener2022-09-181-1/+1
| | | | | | | | | | | Or the comparison against a signed char is always true, because the literal 0xaa is treated as an unsigned int, to which the signed char is casted during comparison. 0xaa is above the positive values of a signed char and negative signed char values result in values larger than 0xaa when casted to unsigned int. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> (cherry picked from commit e9a22ce2535c4a0faf83d5595304fe0e2c7bd1b2)
* mediatek: correctly log i2c responseSven Wegener2022-09-181-2/+2
| | | | | | | | The read response is in the i2c_response variable. Also use %hhx format, because we're dealing with a single char. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> (cherry picked from commit c4f9f9b44c82ffeacd9d3c00ba07171c35831337)
* mediatek: remove gpiod_direction_output()Sven Wegener2022-09-181-2/+0
| | | | | | | It's already set to output with GPIOD_OUT_LOW. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> (cherry picked from commit a188356484f434c72ea536d91d7f93f59c562eb5)
* mediatek: do not use gpiod_set_raw_value()Sven Wegener2022-09-181-2/+2
| | | | | | | The polarity of the signal is set in the device dts. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> (cherry picked from commit 56c2d15587dfe5285f1cf3bfb236c827bc446465)
* mediatek: Add GD5F1GQ5xExxG to mtk-snandRichard Huynh2022-03-211-0/+4
| | | | | | | Some units of the Xiaomi Redmi Router AX6S/Xiaomi Router AX3200 contain this part. Signed-off-by: Richard Huynh <voxlympha@gmail.com> (cherry picked from commit 4177de10df384e0106191e5b204b0aa11431fe77)
* mediatek: mtk-snand: check request size against chip infoChuanhong Guo2021-08-271-9/+13
| | | | | | | | | mtd->size will be overrided by BMT which makes all mtd requests made by bmt fail in request size checking. this commit changes the driver to check against actual chip size in chip info as a workaround. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* mediatek: add a new spi-nand driver for kernel 5.10Weijie Gao2021-08-2710-0/+3971
| | | | | | | | | | | | | This patch adds a new spi-nand driver which implements the SNFI of mt7622 and mt7629. Unlike the existing snfi driver which makes use of the spi-mem framework and the spi-nand framework with modified ecc support, this driver is implemented directly on the mtd framework with other components untouched, and provides better performance, and behaves exactly the same as the nand framework. Signed-off-by: Weijie Gao <hackpascal@gmail.com>
* mediatek: fix Ubiquiti UniFi 6 LR LEDDavid Bauer2021-04-161-0/+210
| | | | | | | | | | When adding Kernel 5.10 support, the kernel configuration did not include the LED driver required for the UniFi 6 LR. Also the actual driver source went missing. Fixes commit c46ccb69d17e ("mediatek: mt7622: add Linux 5.10 support") Signed-off-by: David Bauer <mail@david-bauer.net>
* mediatek: mt7622: add Linux 5.10 supportFelix Fietkau2021-02-28141-0/+97882
Switch mt7622 subtarget to Linux 5.10, it has been tested by many of us on several devices for a couple of weeks already. Signed-off-by: Felix Fietkau <nbd@nbd.name>