From: Frank Wunderlich <[email protected]>
This patch series introduces common bias-pull* pinconf support to MediaTek
MT7986 pinctrl driver and fix some register offsets in the driver.
v2:
- added patches previously postes separately which are needed to have
dt binding checks clean
- fixed odd numbers in comments for mt7986_pull_type
Frank Wunderlich (2):
dt-bindings: pinctrl: update pcie/pwm/spi bindings for MT7986 SoC
dt-bindings: pinctrl: update uart/mmc bindings for MT7986 SoC
Sam Shih (4):
dt-bindings: pinctrl: mt7986: add generic bias-pull* support
pinctrl: mediatek: fix the pinconf register offset of some pins
pinctrl: mediatek: extend pinctrl-moore to support new bias functions
pinctrl: mediatek: add pull_type attribute for mediatek MT7986 SoC
.../pinctrl/mediatek,mt7986-pinctrl.yaml | 108 ++++++++++++++++--
drivers/pinctrl/mediatek/pinctrl-moore.c | 49 ++++++--
drivers/pinctrl/mediatek/pinctrl-mt7986.c | 80 +++++++++++--
3 files changed, 207 insertions(+), 30 deletions(-)
--
2.34.1
From: Sam Shih <[email protected]>
Commit fb34a9ae383a ("pinctrl: mediatek: support rsel feature")
add SoC specify 'pull_type' attribute for bias configuration.
This patch add pull_type attribute to pinctrl-mt7986.c, and make
bias_set_combo and bias_get_combo available to mediatek MT7986 SoC.
Signed-off-by: Sam Shih <[email protected]>
Signed-off-by: Frank Wunderlich <[email protected]>
---
v2:
- fix odd numbers in comments
---
drivers/pinctrl/mediatek/pinctrl-mt7986.c | 56 +++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7986.c b/drivers/pinctrl/mediatek/pinctrl-mt7986.c
index d13c59510468..db3497d6787a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7986.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7986.c
@@ -407,6 +407,60 @@ static const struct mtk_pin_field_calc mt7986_pin_r1_range[] = {
PIN_FIELD_BASE(66, 68, IOCFG_LB_BASE, 0x60, 0x10, 2, 1),
};
+static const unsigned int mt7986_pull_type[] = {
+ MTK_PULL_PUPD_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E,/*68*/ MTK_PULL_PU_PD_TYPE,/*69*/
+ MTK_PULL_PU_PD_TYPE,/*70*/ MTK_PULL_PU_PD_TYPE,/*71*/
+ MTK_PULL_PU_PD_TYPE,/*72*/ MTK_PULL_PU_PD_TYPE,/*73*/
+ MTK_PULL_PU_PD_TYPE,/*74*/ MTK_PULL_PU_PD_TYPE,/*75*/
+ MTK_PULL_PU_PD_TYPE,/*76*/ MTK_PULL_PU_PD_TYPE,/*77*/
+ MTK_PULL_PU_PD_TYPE,/*78*/ MTK_PULL_PU_PD_TYPE,/*79*/
+ MTK_PULL_PU_PD_TYPE,/*80*/ MTK_PULL_PU_PD_TYPE,/*81*/
+ MTK_PULL_PU_PD_TYPE,/*82*/ MTK_PULL_PU_PD_TYPE,/*83*/
+ MTK_PULL_PU_PD_TYPE,/*84*/ MTK_PULL_PU_PD_TYPE,/*85*/
+ MTK_PULL_PU_PD_TYPE,/*86*/ MTK_PULL_PU_PD_TYPE,/*87*/
+ MTK_PULL_PU_PD_TYPE,/*88*/ MTK_PULL_PU_PD_TYPE,/*89*/
+ MTK_PULL_PU_PD_TYPE,/*90*/ MTK_PULL_PU_PD_TYPE,/*91*/
+ MTK_PULL_PU_PD_TYPE,/*92*/ MTK_PULL_PU_PD_TYPE,/*93*/
+ MTK_PULL_PU_PD_TYPE,/*94*/ MTK_PULL_PU_PD_TYPE,/*95*/
+ MTK_PULL_PU_PD_TYPE,/*96*/ MTK_PULL_PU_PD_TYPE,/*97*/
+ MTK_PULL_PU_PD_TYPE,/*98*/ MTK_PULL_PU_PD_TYPE,/*99*/
+ MTK_PULL_PU_PD_TYPE,/*100*/
+};
+
static const struct mtk_pin_reg_calc mt7986_reg_cals[] = {
[PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt7986_pin_mode_range),
[PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt7986_pin_dir_range),
@@ -866,6 +920,7 @@ static struct mtk_pin_soc mt7986a_data = {
.ies_present = false,
.base_names = mt7986_pinctrl_register_base_names,
.nbase_names = ARRAY_SIZE(mt7986_pinctrl_register_base_names),
+ .pull_type = mt7986_pull_type,
.bias_set_combo = mtk_pinconf_bias_set_combo,
.bias_get_combo = mtk_pinconf_bias_get_combo,
.drive_set = mtk_pinconf_drive_set_rev1,
@@ -887,6 +942,7 @@ static struct mtk_pin_soc mt7986b_data = {
.ies_present = false,
.base_names = mt7986_pinctrl_register_base_names,
.nbase_names = ARRAY_SIZE(mt7986_pinctrl_register_base_names),
+ .pull_type = mt7986_pull_type,
.bias_set_combo = mtk_pinconf_bias_set_combo,
.bias_get_combo = mtk_pinconf_bias_get_combo,
.drive_set = mtk_pinconf_drive_set_rev1,
--
2.34.1
Il 06/11/22 09:01, Frank Wunderlich ha scritto:
> From: Sam Shih <[email protected]>
>
> Commit fb34a9ae383a ("pinctrl: mediatek: support rsel feature")
> add SoC specify 'pull_type' attribute for bias configuration.
>
> This patch add pull_type attribute to pinctrl-mt7986.c, and make
> bias_set_combo and bias_get_combo available to mediatek MT7986 SoC.
>
> Signed-off-by: Sam Shih <[email protected]>
> Signed-off-by: Frank Wunderlich <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
On Sun, Nov 6, 2022 at 9:01 AM Frank Wunderlich <[email protected]> wrote:
> From: Frank Wunderlich <[email protected]>
>
> This patch series introduces common bias-pull* pinconf support to MediaTek
> MT7986 pinctrl driver and fix some register offsets in the driver.
>
> v2:
> - added patches previously postes separately which are needed to have
> dt binding checks clean
> - fixed odd numbers in comments for mt7986_pull_type
Oh OK thanks for collecting the stuff I need, I applied this series,
I had to use some fuzz on patch 5/6 due to other patches I have
applied so please check the result once I push it out.
Yours,
Linus Walleij