summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/mediatek
Commit message (Collapse)AuthorAgeFilesLines
* pinctrl: mt7629: add jtag function and pin groupWeijie Gao2021-03-201-0/+7
| | | | | | | The EPHY LEDs of mt7629 can be used as JTAG. This patch adds the jtag pin group to the pinctrl driver. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
* pinctrl: mediatek: do not probe gpio driver if not enabledWeijie Gao2021-03-201-4/+8
| | | | | | | | | | | The mtk pinctrl driver is a combination driver with support for both pinctrl and gpio. When this driver is used in SPL, gpio support may not be enabled, and this will result in a compilation error. To fix this, macros are added to make sure gpio related code will only be compiled when gpio support is enabled. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
* pinctrl: mediatek: add get_pin_muxing ops for mediatek pinctrlSam Shih2021-03-201-0/+14
| | | | | | This patch add get_pin_muxing support for mediatek pinctrl drivers Signed-off-by: Sam Shih <sam.shih@mediatek.com>
* pinctrl: mediatek: fix wrong assignment in mtk_get_pin_nameSam Shih2021-03-201-1/+1
| | | | | | | This is a bug fix for mtk pinctrl common part. Appearently pins should be used instead of grps in mtk_get_pin_name(). Signed-off-by: Sam Shih <sam.shih@mediatek.com>
* pinctrl: mediatek: correct error handlingHeinrich Schuchardt2021-01-181-0/+1
| | | | | | | | | | If no GPIO controller is found, the return value should not depend on a random value on the stack. Initialize variable ret. The problem was indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
* dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass2020-12-136-6/+6
| | | | | | | | | | | | This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
* pinctrl: mediatek: mt8512: fix the wrong start address of rangesChunfeng Yun2020-08-191-3/+3
| | | | | | | The start address of dout, pullen and pullsel ragnes are wrong, so fix up them. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
* pinctrl: mediatek: add PUPD/R0/R1 support for MT7623David Woodhouse2020-07-293-5/+146
| | | | | | | | | The pins for the MMC controller weren't being set up correctly because the pinctrl driver only sets the GPIO pullup/pulldown config and doesn't handle the special cases with PUPD/R0/R1 control. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Tested-by: Frank Wunderlich <frank-w@public-files.de>
* dm: Fix error handling for dev_read_addr_ptrSean Anderson2020-07-011-1/+1
| | | | | | | | | | | | dev_read_addr_ptr had different semantics depending on whether OF_LIVE was enabled. This patch converts both implementations to return NULL on error, and converts all call sites which check for FDT_ADDR_T_NONE to check for NULL instead. This patch also removes the call to map_physmem, since we have dev_remap_addr* for those semantics. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* common: Drop linux/bitops.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* pinctrl: mediatek: add support for different pinctrlSam Shih2020-01-167-19/+125
| | | | | | | | | Due to the pinctrl hardware of MT7622 is difference from others SoC which using the common part of mediatek pinctrl. So we need to modify the common part of mediatek pinctrl. Signed-off-by: Sam Shih <sam.shih@mediatek.com> Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
* pinctrl: mediatek: add driver for MT7622Sam Shih2020-01-163-0/+757
| | | | | | | This patch add Pinctrl driver for MediaTek MT7622 SoC. Signed-off-by: Sam Shih <sam.shih@mediatek.com> Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
* pinctrl: mediatek: add driver for MT8512mingming lee2020-01-163-0/+392
| | | | | | Add Pinctrl driver for MediaTek MT8512 SoC. Signed-off-by: mingming lee <mingming.lee@mediatek.com>
* pinctrl: add driver for MT8518mingming lee2019-12-033-0/+416
| | | | | | Add Pinctrl driver for MediaTek MT8518 SoC. Signed-off-by: mingming lee <mingming.lee@mediatek.com>
* pinctrl: mediatek: fix warningFabien Parent2019-07-291-0/+2
| | | | | | | | | | | Fix the following warning when CONFIG_PINCONF=n: drivers/pinctrl/mediatek/pinctrl-mtk-common.c:35:36: warning: ‘mtk_drive’ defined but not used [-Wunused-const-variable=] static const struct mtk_drive_desc mtk_drive[] = { ^~~~~~~~~ Signed-off-by: Fabien Parent <fparent@baylibre.com>
* pinctrl: add driver for MT8516Fabien Parent2019-04-233-0/+396
| | | | | | | Add Pinctrl driver for MediaTek MT8516 SoC. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Ryder Lee <ryder.lee@mediatek.com>
* pinctrl: MediaTek: add pinctrl driver for MT7623 SoCRyder Lee2018-11-284-0/+1291
| | | | | | | | | | This patch adds pinctrl support for MT7623 SoC. And most of the structures are used to hold the hardware configuration for each pin. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Tested-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* pinctrl: MediaTek: add pinctrl driver for MT7629 SoCRyder Lee2018-11-285-0/+1161
This patch adds pinctrl support for MT7629 SoC. The IO core found on the SoC has the registers for pinctrl, pinconf and gpio mixed up in the same register range. Hence the driver also implements the gpio functionality through UCLASS_GPIO. This also creates a common file as there might be other chips that use the same binding and driver, then being a little more abstract could help in the long run. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Reviewed-by: Simon Glass <sjg@chromium.org>