pinctrl: Fixes for AST2600 support
Subsystems (5)
cover pinctrl: Fixes for AST2600 support
Hello,
This series resolves several issues found in testing by Johnny Huang from ASPEED, who also contributed the patches to fix them. We'll have more patches from him in the near future (which I'm pretty happy about).
The major issue resolved is the way I grouped the eMMC pins. What I had was ugly and I want to get rid of it before the binding is solidified with the 5.4 release.
The remaining fixes are minor issues that stem from lack of documentation or understanding on my part, and at least one brain-fart.
Please review!
Andrew
Andrew Jeffery (4):
dt-bindings: pinctrl: aspeed-g6: Rework SD3 function and groups
pinctrl: aspeed-g6: Sort pins for sanity
pinctrl: aspeed-g6: Fix I2C14 SDA description
pinctrl: aspeed-g6: Make SIG_DESC_CLEAR() behave intuitively
Johnny Huang (3):
pinctrl: aspeed-g6: Fix I3C3/I3C4 pinmux configuration
pinctrl: aspeed-g6: Fix UART13 group pinmux
pinctrl: aspeed-g6: Rename SD3 to EMMC and rework pin groups
.../pinctrl/aspeed,ast2600-pinctrl.yaml | 86 ++++++------ drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 124 ++++++++---------- drivers/pinctrl/aspeed/pinmux-aspeed.h | 3 +- 3 files changed, 98 insertions(+), 115 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/7 dt-bindings: pinctrl: aspeed-g6: Rework SD3 function and groups
Rename SD3 functions and groups to EMMC to better reflect their intended use before the binding escapes too far into the wild. Also clean up the SD3 pin groups to eliminate some silliness that slipped through the cracks (SD3DAT[4-7]) by unifying them into three new groups: EMMCG1, EMMCG4 and EMMCG8 for 1, 4 and 8-bit data buses respectively.
---
Unfortunately reflowing the list creates a lot of noise in this change. As mentioned the SD3DAT[4-7] groups are renamed, as is the SD3 function. There should be no functional changes beyond that.
.../pinctrl/aspeed,ast2600-pinctrl.yaml | 86 +++++++++---------- 1 file changed, 42 insertions(+), 44 deletions(-)
Documentation/devicetree/bindings/pinctrl/aspeed,ast2600-pinctrl.yaml +42 -44
@@ -33,13 +33,13 @@ patternProperties: allOf: - $ref: "/schemas/types.yaml#/definitions/string" - enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15, - ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, ESPI, - ESPIALT, FSI1, FSI2, FWSPIABR, FWSPID, FWSPIWP, GPIT0, GPIT1, - GPIT2, GPIT3, GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1, GPIU2, - GPIU3, GPIU4, GPIU5, GPIU6, GPIU7, I2C1, I2C10, I2C11, I2C12, - I2C13, I2C14, I2C15, I2C16, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7, - I2C8, I2C9, I3C3, I3C4, I3C5, I3C6, JTAGM, LHPD, LHSIRQ, LPC, - LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ, MACLINK1, MACLINK2, + ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMC, + ESPI, ESPIALT, FSI1, FSI2, FWSPIABR, FWSPID, FWSPIWP, GPIT0, + GPIT1, GPIT2, GPIT3, GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1, + GPIU2, GPIU3, GPIU4, GPIU5, GPIU6, GPIU7, I2C1, I2C10, I2C11, + I2C12, I2C13, I2C14, I2C15, I2C16, I2C2, I2C3, I2C4, I2C5, I2C6, + I2C7, I2C8, I2C9, I3C3, I3C4, I3C5, I3C6, JTAGM, LHPD, LHSIRQ, + LPC, LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ, MACLINK1, MACLINK2, MACLINK3, MACLINK4, MDIO1, MDIO2, MDIO3, MDIO4, NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, NDCD2, NDCD3, NDCD4, NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2, NDTR3, NDTR4, NRI1, NRI2, NRI3, NRI4, NRTS1,
@@ -48,47 +48,45 @@ patternProperties: PWM8, PWM9, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3, RMII4, RXD1, RXD2, RXD3, RXD4, SALT1, SALT10, SALT11, SALT12, SALT13, SALT14, SALT15, SALT16, SALT2, SALT3, SALT4, SALT5, - SALT6, SALT7, SALT8, SALT9, SD1, SD2, SD3, SD3DAT4, SD3DAT5, - SD3DAT6, SD3DAT7, SGPM1, SGPS1, SIOONCTRL, SIOPBI, SIOPBO, - SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1ABR, SPI1CS1, - SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11, - TACH12, TACH13, TACH14, TACH15, TACH2, TACH3, TACH4, TACH5, - TACH6, TACH7, TACH8, TACH9, THRU0, THRU1, THRU2, THRU3, TXD1, - TXD2, TXD3, TXD4, UART10, UART11, UART12, UART13, UART6, UART7, - UART8, UART9, VB, VGAHS, VGAVS, WDTRST1, WDTRST2, WDTRST3, - WDTRST4, ] + SALT6, SALT7, SALT8, SALT9, SD1, SD2, SGPM1, SGPS1, SIOONCTRL, + SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, + SPI1ABR, SPI1CS1, SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1, + TACH10, TACH11, TACH12, TACH13, TACH14, TACH15, TACH2, TACH3, + TACH4, TACH5, TACH6, TACH7, TACH8, TACH9, THRU0, THRU1, THRU2, + THRU3, TXD1, TXD2, TXD3, TXD4, UART10, UART11, UART12, UART13, + UART6, UART7, UART8, UART9, VB, VGAHS, VGAVS, WDTRST1, WDTRST2, + WDTRST3, WDTRST4, ] groups: allOf: - $ref: "/schemas/types.yaml#/definitions/string" - enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15, - ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, ESPI, - ESPIALT, FSI1, FSI2, FWSPIABR, FWSPID, FWQSPID, FWSPIWP, GPIT0, - GPIT1, GPIT2, GPIT3, GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1, - GPIU2, GPIU3, GPIU4, GPIU5, GPIU6, GPIU7, HVI3C3, HVI3C4, I2C1, - I2C10, I2C11, I2C12, I2C13, I2C14, I2C15, I2C16, I2C2, I2C3, - I2C4, I2C5, I2C6, I2C7, I2C8, I2C9, I3C3, I3C4, I3C5, I3C6, - JTAGM, LHPD, LHSIRQ, LPC, LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ, - MACLINK1, MACLINK2, MACLINK3, MACLINK4, MDIO1, MDIO2, MDIO3, - MDIO4, NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, NDCD2, NDCD3, NDCD4, - NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2, NDTR3, NDTR4, NRI1, - NRI2, NRI3, NRI4, NRTS1, NRTS2, NRTS3, NRTS4, OSCCLK, PEWAKE, - PWM0, PWM1, PWM10G0, PWM10G1, PWM11G0, PWM11G1, PWM12G0, PWM12G1, - PWM13G0, PWM13G1, PWM14G0, PWM14G1, PWM15G0, PWM15G1, PWM2, PWM3, - PWM4, PWM5, PWM6, PWM7, PWM8G0, PWM8G1, PWM9G0, PWM9G1, QSPI1, - QSPI2, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3, - RMII4, RXD1, RXD2, RXD3, RXD4, SALT1, SALT10G0, SALT10G1, - SALT11G0, SALT11G1, SALT12G0, SALT12G1, SALT13G0, SALT13G1, - SALT14G0, SALT14G1, SALT15G0, SALT15G1, SALT16G0, SALT16G1, - SALT2, SALT3, SALT4, SALT5, SALT6, SALT7, SALT8, SALT9G0, - SALT9G1, SD1, SD2, SD3, SD3DAT4, SD3DAT5, SD3DAT6, SD3DAT7, - SGPM1, SGPS1, SIOONCTRL, SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD, - SIOS3, SIOS5, SIOSCI, SPI1, SPI1ABR, SPI1CS1, SPI1WP, SPI2, - SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11, TACH12, TACH13, - TACH14, TACH15, TACH2, TACH3, TACH4, TACH5, TACH6, TACH7, TACH8, - TACH9, THRU0, THRU1, THRU2, THRU3, TXD1, TXD2, TXD3, TXD4, - UART10, UART11, UART12G0, UART12G1, UART13G0, UART13G1, UART6, - UART7, UART8, UART9, VB, VGAHS, VGAVS, WDTRST1, WDTRST2, WDTRST3, - WDTRST4, ] + ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMCG1, + EMMCG4, EMMCG8, ESPI, ESPIALT, FSI1, FSI2, FWSPIABR, FWSPID, + FWQSPID, FWSPIWP, GPIT0, GPIT1, GPIT2, GPIT3, GPIT4, GPIT5, + GPIT6, GPIT7, GPIU0, GPIU1, GPIU2, GPIU3, GPIU4, GPIU5, GPIU6, + GPIU7, HVI3C3, HVI3C4, I2C1, I2C10, I2C11, I2C12, I2C13, I2C14, + I2C15, I2C16, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7, I2C8, I2C9, + I3C3, I3C4, I3C5, I3C6, JTAGM, LHPD, LHSIRQ, LPC, LPCHC, LPCPD, + LPCPME, LPCSMI, LSIRQ, MACLINK1, MACLINK2, MACLINK3, MACLINK4, + MDIO1, MDIO2, MDIO3, MDIO4, NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, + NDCD2, NDCD3, NDCD4, NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2, + NDTR3, NDTR4, NRI1, NRI2, NRI3, NRI4, NRTS1, NRTS2, NRTS3, NRTS4, + OSCCLK, PEWAKE, PWM0, PWM1, PWM10G0, PWM10G1, PWM11G0, PWM11G1, + PWM12G0, PWM12G1, PWM13G0, PWM13G1, PWM14G0, PWM14G1, PWM15G0, + PWM15G1, PWM2, PWM3, PWM4, PWM5, PWM6, PWM7, PWM8G0, PWM8G1, + PWM9G0, PWM9G1, QSPI1, QSPI2, RGMII1, RGMII2, RGMII3, RGMII4, + RMII1, RMII2, RMII3, RMII4, RXD1, RXD2, RXD3, RXD4, SALT1, + SALT10G0, SALT10G1, SALT11G0, SALT11G1, SALT12G0, SALT12G1, + SALT13G0, SALT13G1, SALT14G0, SALT14G1, SALT15G0, SALT15G1, + SALT16G0, SALT16G1, SALT2, SALT3, SALT4, SALT5, SALT6, SALT7, + SALT8, SALT9G0, SALT9G1, SD1, SD2, SD3, SGPM1, SGPS1, SIOONCTRL, + SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, + SPI1ABR, SPI1CS1, SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1, + TACH10, TACH11, TACH12, TACH13, TACH14, TACH15, TACH2, TACH3, + TACH4, TACH5, TACH6, TACH7, TACH8, TACH9, THRU0, THRU1, THRU2, + THRU3, TXD1, TXD2, TXD3, TXD4, UART10, UART11, UART12G0, + UART12G1, UART13G0, UART13G1, UART6, UART7, UART8, UART9, VB, + VGAHS, VGAVS, WDTRST1, WDTRST2, WDTRST3, WDTRST4, ] required: - compatible
Signature · 1 line
2.20.1
Re: [PATCH 1/7] dt-bindings: pinctrl: aspeed-g6: Rework SD3 function and groups
Quoted 6 lines · Andrew Jeffery
Rename SD3 functions and groups to EMMC to better reflect their intended use before the binding escapes too far into the wild. Also clean up the SD3 pin groups to eliminate some silliness that slipped through the cracks (SD3DAT[4-7]) by unifying them into three new groups: EMMCG1, EMMCG4 and EMMCG8 for 1, 4 and 8-bit data buses respectively.
Quoted 9 lines
Signed-off-by Andrew Jeffery <[email protected]>---
Unfortunately reflowing the list creates a lot of noise in this change. As mentioned the SD3DAT[4-7] groups are renamed, as is the SD3 function. There should be no functional changes beyond that..../pinctrl/aspeed,ast2600-pinctrl.yaml | 86 +++++++++---------- 1 file changed, 42 insertions(+), 44 deletions(-)
PATCH 2/7 pinctrl: aspeed-g6: Sort pins for sanity
In reply to Andrew JefferySome pins crept in that weren't ordered in the list.
--- drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c +11 -11
@@ -1574,6 +1574,8 @@ static struct pinctrl_pin_desc aspeed_g6_pins[ASPEED_G6_NR_PINS] = {ASPEED_PINCTRL_PIN (A3 ),ASPEED_PINCTRL_PIN (AA11 ),ASPEED_PINCTRL_PIN (AA12 ), +ASPEED_PINCTRL_PIN (AA16 ), +ASPEED_PINCTRL_PIN (AA17 ),ASPEED_PINCTRL_PIN (AA23 ),ASPEED_PINCTRL_PIN (AA24 ), ASPEED_PINCTRL_PIN(AA25),
@@ -1585,6 +1587,8 @@ static struct pinctrl_pin_desc aspeed_g6_pins[ASPEED_G6_NR_PINS] = {ASPEED_PINCTRL_PIN (AB11 ),ASPEED_PINCTRL_PIN (AB12 ),ASPEED_PINCTRL_PIN (AB15 ), +ASPEED_PINCTRL_PIN (AB16 ), +ASPEED_PINCTRL_PIN (AB17 ),ASPEED_PINCTRL_PIN (AB18 ),ASPEED_PINCTRL_PIN (AB19 ), ASPEED_PINCTRL_PIN(AB22),
@@ -1602,6 +1606,7 @@ static struct pinctrl_pin_desc aspeed_g6_pins[ASPEED_G6_NR_PINS] = {ASPEED_PINCTRL_PIN (AC11 ),ASPEED_PINCTRL_PIN (AC12 ),ASPEED_PINCTRL_PIN (AC15 ), +ASPEED_PINCTRL_PIN (AC16 ),ASPEED_PINCTRL_PIN (AC17 ),ASPEED_PINCTRL_PIN (AC18 ), ASPEED_PINCTRL_PIN(AC19),
@@ -1619,6 +1624,7 @@ static struct pinctrl_pin_desc aspeed_g6_pins[ASPEED_G6_NR_PINS] = {ASPEED_PINCTRL_PIN (AD12 ),ASPEED_PINCTRL_PIN (AD14 ),ASPEED_PINCTRL_PIN (AD15 ), +ASPEED_PINCTRL_PIN (AD16 ),ASPEED_PINCTRL_PIN (AD19 ),ASPEED_PINCTRL_PIN (AD20 ), ASPEED_PINCTRL_PIN(AD22),
@@ -1634,8 +1640,11 @@ static struct pinctrl_pin_desc aspeed_g6_pins[ASPEED_G6_NR_PINS] = {ASPEED_PINCTRL_PIN (AE12 ),ASPEED_PINCTRL_PIN (AE14 ),ASPEED_PINCTRL_PIN (AE15 ), +ASPEED_PINCTRL_PIN (AE16 ),ASPEED_PINCTRL_PIN (AE18 ),ASPEED_PINCTRL_PIN (AE19 ), +ASPEED_PINCTRL_PIN (AE25 ), +ASPEED_PINCTRL_PIN (AE26 ),ASPEED_PINCTRL_PIN (AE7 ),ASPEED_PINCTRL_PIN (AE8 ), ASPEED_PINCTRL_PIN(AF10),
@@ -1643,6 +1652,8 @@ static struct pinctrl_pin_desc aspeed_g6_pins[ASPEED_G6_NR_PINS] = {ASPEED_PINCTRL_PIN (AF12 ),ASPEED_PINCTRL_PIN (AF14 ),ASPEED_PINCTRL_PIN (AF15 ), +ASPEED_PINCTRL_PIN (AF24 ), +ASPEED_PINCTRL_PIN (AF25 ),ASPEED_PINCTRL_PIN (AF7 ),ASPEED_PINCTRL_PIN (AF8 ), ASPEED_PINCTRL_PIN(AF9),
@@ -1792,17 +1803,6 @@ static struct pinctrl_pin_desc aspeed_g6_pins[ASPEED_G6_NR_PINS] = {ASPEED_PINCTRL_PIN (Y3 ),ASPEED_PINCTRL_PIN (Y4 ), ASPEED_PINCTRL_PIN(Y5), -ASPEED_PINCTRL_PIN (AB16 ), -ASPEED_PINCTRL_PIN (AA17 ), -ASPEED_PINCTRL_PIN (AB17 ), -ASPEED_PINCTRL_PIN (AE16 ), -ASPEED_PINCTRL_PIN (AC16 ), -ASPEED_PINCTRL_PIN (AA16 ), -ASPEED_PINCTRL_PIN (AD16 ), -ASPEED_PINCTRL_PIN (AF25 ), -ASPEED_PINCTRL_PIN (AE26 ), -ASPEED_PINCTRL_PIN (AE25 ), - ASPEED_PINCTRL_PIN(AF24), };static const struct aspeed_pin_group aspeed_g6_groups[] = {
Signature · 1 line
2.20.1
PATCH 3/7 pinctrl: aspeed-g6: Fix I2C14 SDA description
In reply to Andrew JefferyThe I2C function the pin participated in was incorrectly named SDA14 which lead to a failure to mux:
[ 6.884344] No function I2C14 found on pin 7 (7). Found signal(s) MACLINK4, SDA14, GPIOA7 for function(s) MACLINK4, SDA14, GPIOA7
--- drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c +1 -1
@@ -87,7 +87,7 @@ FUNC_GROUP_DECL(MACLINK3, L23);#define K25 7SIG_EXPR_LIST_DECL_SESG (K25 ,MACLINK4 ,MACLINK4 ,SIG_DESC_SET (SCU410 ,7 )); -SIG_EXPR_LIST_DECL_SESG (K25 ,SDA14 ,SDA14 ,SIG_DESC_SET (SCU4B0 ,7 )); +SIG_EXPR_LIST_DECL_SESG (K25 ,SDA14 ,I2C14 ,SIG_DESC_SET (SCU4B0 ,7 ));PIN_DECL_2 (K25 ,GPIOA7 ,MACLINK4 ,SDA14 );FUNC_GROUP_DECL (MACLINK4 ,K25 );
Signature · 1 line
2.20.1
PATCH 4/7 pinctrl: aspeed-g6: Fix I3C3/I3C4 pinmux configuration
In reply to Andrew JefferyFrom: Johnny Huang <[email protected]>
The documentation to configure I3C3/FSI1 and I3C4/FSI2 was initially unclear.
--- drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-)
drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c +8 -16
@@ -1513,18 +1513,14 @@ FUNC_GROUP_DECL(VB, Y1, Y2, Y3, Y4);* following 4 pins */ #define AF25 244 -SIG_EXPR_LIST_DECL_SEMG (AF25 ,I3C3SCL ,I3C3 ,I3C3 ,SIG_DESC_SET (SCU438 ,20 ), -SIG_DESC_SET (SCU4D8 ,20 )); -SIG_EXPR_LIST_DECL_SESG (AF25 ,FSI1CLK ,FSI1 ,SIG_DESC_CLEAR (SCU438 ,20 ), -SIG_DESC_SET (SCU4D8 ,20 )); +SIG_EXPR_LIST_DECL_SEMG (AF25 ,I3C3SCL ,I3C3 ,I3C3 ,SIG_DESC_SET (SCU438 ,20 )); +SIG_EXPR_LIST_DECL_SESG (AF25 ,FSI1CLK ,FSI1 ,SIG_DESC_SET (SCU4D8 ,20 ));PIN_DECL_ (AF25 ,SIG_EXPR_LIST_PTR (AF25 ,I3C3SCL ),SIG_EXPR_LIST_PTR (AF25 ,FSI1CLK ));#define AE26 245 -SIG_EXPR_LIST_DECL_SEMG (AE26 ,I3C3SDA ,I3C3 ,I3C3 ,SIG_DESC_SET (SCU438 ,21 ), -SIG_DESC_SET (SCU4D8 ,21 )); -SIG_EXPR_LIST_DECL_SESG (AE26 ,FSI1DATA ,FSI1 ,SIG_DESC_CLEAR (SCU438 ,21 ), -SIG_DESC_SET (SCU4D8 ,21 )); +SIG_EXPR_LIST_DECL_SEMG (AE26 ,I3C3SDA ,I3C3 ,I3C3 ,SIG_DESC_SET (SCU438 ,21 )); +SIG_EXPR_LIST_DECL_SESG (AE26 ,FSI1DATA ,FSI1 ,SIG_DESC_SET (SCU4D8 ,21 ));PIN_DECL_ (AE26 ,SIG_EXPR_LIST_PTR (AE26 ,I3C3SDA ),SIG_EXPR_LIST_PTR (AE26 ,FSI1DATA ));
@@ -1533,18 +1529,14 @@ FUNC_DECL_2(I3C3, HVI3C3, I3C3);FUNC_GROUP_DECL (FSI1 ,AF25 ,AE26 );#define AE25 246 -SIG_EXPR_LIST_DECL_SEMG (AE25 ,I3C4SCL ,I3C4 ,I3C4 ,SIG_DESC_SET (SCU438 ,22 ), -SIG_DESC_SET (SCU4D8 ,22 )); -SIG_EXPR_LIST_DECL_SESG (AE25 ,FSI2CLK ,FSI2 ,SIG_DESC_CLEAR (SCU438 ,22 ), -SIG_DESC_SET (SCU4D8 ,22 )); +SIG_EXPR_LIST_DECL_SEMG (AE25 ,I3C4SCL ,I3C4 ,I3C4 ,SIG_DESC_SET (SCU438 ,22 )); +SIG_EXPR_LIST_DECL_SESG (AE25 ,FSI2CLK ,FSI2 ,SIG_DESC_SET (SCU4D8 ,22 ));PIN_DECL_ (AE25 ,SIG_EXPR_LIST_PTR (AE25 ,I3C4SCL ),SIG_EXPR_LIST_PTR (AE25 ,FSI2CLK ));#define AF24 247 -SIG_EXPR_LIST_DECL_SEMG (AF24 ,I3C4SDA ,I3C4 ,I3C4 ,SIG_DESC_SET (SCU438 ,23 ), -SIG_DESC_SET (SCU4D8 ,23 )); -SIG_EXPR_LIST_DECL_SESG (AF24 ,FSI2DATA ,FSI2 ,SIG_DESC_CLEAR (SCU438 ,23 ), -SIG_DESC_SET (SCU4D8 ,23 )); +SIG_EXPR_LIST_DECL_SEMG (AF24 ,I3C4SDA ,I3C4 ,I3C4 ,SIG_DESC_SET (SCU438 ,23 )); +SIG_EXPR_LIST_DECL_SESG (AF24 ,FSI2DATA ,FSI2 ,SIG_DESC_SET (SCU4D8 ,23 ));PIN_DECL_ (AF24 ,SIG_EXPR_LIST_PTR (AF24 ,I3C4SDA ),SIG_EXPR_LIST_PTR (AF24 ,FSI2DATA ));
Signature · 1 line
2.20.1
PATCH 5/7 pinctrl: aspeed-g6: Make SIG_DESC_CLEAR() behave intuitively
In reply to Andrew JefferySignal descriptors can represent multi-bit bitfields and so have explicit "enable" and "disable" states. However many descriptor instances only describe a single bit, and so the SIG_DESC_SET() macro is provides an abstraction for the single-bit cases: Its expansion configures the "enable" state to set the bit and "disable" to clear.
SIG_DESC_CLEAR() was introduced to provide a similar single-bit abstraction for for descriptors to clear the bit of interest. However its behaviour was defined as the literal inverse of SIG_DESC_SET() - the impact is the bit of interest is set in the disable path. This behaviour isn't intuitive and doesn't align with how we want to use the macro in practice, so make it clear the bit for both the enable and disable paths.
--- drivers/pinctrl/aspeed/pinmux-aspeed.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/aspeed/pinmux-aspeed.h +1 -1
@@ -508,7 +508,7 @@ struct aspeed_pin_desc {* @idx: The bit index in the register */ #define SIG_DESC_SET (reg, idx) SIG_DESC_IP_BIT(ASPEED_IP_SCU, reg, idx, 1) -#define SIG_DESC_CLEAR (reg, idx) SIG_DESC_IP_BIT(ASPEED_IP_SCU, reg, idx, 0) +#define SIG_DESC_CLEAR (reg, idx) { ASPEED_IP_SCU, reg, BIT_MASK(idx), 0, 0 }#define SIG_DESC_LIST_SYM (sig, group) sig_descs_ ## sig ## _ ## group#define SIG_DESC_LIST_DECL (sig, group, ...) \
Signature · 1 line
2.20.1
PATCH 6/7 pinctrl: aspeed-g6: Fix UART13 group pinmux
In reply to Andrew JefferyFrom: Johnny Huang <[email protected]>
When UART13G1 is set the pinmux configuration in SCU4B8 for UART13G0 should be cleared.
--- drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c +2 -2
@@ -1262,13 +1262,13 @@ GROUP_DECL(SPI1, AB11, AC11, AA11);#define AD11 206SIG_EXPR_LIST_DECL_SEMG (AD11 ,SPI1DQ2 ,QSPI1 ,SPI1 ,SIG_DESC_SET (SCU438 ,14 ));SIG_EXPR_LIST_DECL_SEMG (AD11 ,TXD13 ,UART13G1 ,UART13 , -SIG_DESC_SET (SCU438 ,14 )); +SIG_DESC_CLEAR (SCU4B8 ,2 ),SIG_DESC_SET (SCU4D8 ,14 ));PIN_DECL_2 (AD11 ,GPIOZ6 ,SPI1DQ2 ,TXD13 );#define AF10 207SIG_EXPR_LIST_DECL_SEMG (AF10 ,SPI1DQ3 ,QSPI1 ,SPI1 ,SIG_DESC_SET (SCU438 ,15 ));SIG_EXPR_LIST_DECL_SEMG (AF10 ,RXD13 ,UART13G1 ,UART13 , -SIG_DESC_SET (SCU438 ,15 )); +SIG_DESC_CLEAR (SCU4B8 ,3 ),SIG_DESC_SET (SCU4D8 ,15 ));PIN_DECL_2 (AF10 ,GPIOZ7 ,SPI1DQ3 ,RXD13 );GROUP_DECL (QSPI1 ,AB11 ,AC11 ,AA11 ,AD11 ,AF10 );
Signature · 1 line
2.20.1
PATCH 7/7 pinctrl: aspeed-g6: Rename SD3 to EMMC and rework pin groups
In reply to Andrew JefferyFrom: Johnny Huang <[email protected]>
AST2600 EMMC support 3 types DAT bus sizes (1, 4 and 8-bit), corresponding to 3 groups: EMMCG1, EMMCG4 and EMMCG8
--- drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 72 ++++++++++------------ drivers/pinctrl/aspeed/pinmux-aspeed.h | 1 + 2 files changed, 33 insertions(+), 40 deletions(-)
drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c +32 -40
@@ -1440,74 +1440,72 @@ FUNC_GROUP_DECL(RGMII2, D4, C2, C1, D3, E4, F5, D2, E3, D1, F4, E2, E1);FUNC_GROUP_DECL (RMII2 ,D4 ,C2 ,C1 ,D3 ,D2 ,D1 ,F4 ,E2 ,E1 );#define AB4 232 -SIG_EXPR_LIST_DECL_SESG (AB4 ,SD3CLK ,SD3 ,SIG_DESC_SET (SCU400 ,24 )); -PIN_DECL_1 (AB4 ,GPIO18D0 ,SD3CLK ); +SIG_EXPR_LIST_DECL_SEMG (AB4 ,EMMCCLK ,EMMCG1 ,EMMC ,SIG_DESC_SET (SCU400 ,24 )); +PIN_DECL_1 (AB4 ,GPIO18D0 ,EMMCCLK );#define AA4 233 -SIG_EXPR_LIST_DECL_SESG (AA4 ,SD3CMD ,SD3 ,SIG_DESC_SET (SCU400 ,25 )); -PIN_DECL_1 (AA4 ,GPIO18D1 ,SD3CMD ); +SIG_EXPR_LIST_DECL_SEMG (AA4 ,EMMCCMD ,EMMCG1 ,EMMC ,SIG_DESC_SET (SCU400 ,25 )); +PIN_DECL_1 (AA4 ,GPIO18D1 ,EMMCCMD );#define AC4 234 -SIG_EXPR_LIST_DECL_SESG (AC4 ,SD3DAT0 ,SD3 ,SIG_DESC_SET (SCU400 ,26 )); -PIN_DECL_1 (AC4 ,GPIO18D2 ,SD3DAT0 ); +SIG_EXPR_LIST_DECL_SEMG (AC4 ,EMMCDAT0 ,EMMCG1 ,EMMC ,SIG_DESC_SET (SCU400 ,26 )); +PIN_DECL_1 (AC4 ,GPIO18D2 ,EMMCDAT0 );#define AA5 235 -SIG_EXPR_LIST_DECL_SESG (AA5 ,SD3DAT1 ,SD3 ,SIG_DESC_SET (SCU400 ,27 )); -PIN_DECL_1 (AA5 ,GPIO18D3 ,SD3DAT1 ); +SIG_EXPR_LIST_DECL_SEMG (AA5 ,EMMCDAT1 ,EMMCG4 ,EMMC ,SIG_DESC_SET (SCU400 ,27 )); +PIN_DECL_1 (AA5 ,GPIO18D3 ,EMMCDAT1 );#define Y5 236 -SIG_EXPR_LIST_DECL_SESG (Y5 ,SD3DAT2 ,SD3 ,SIG_DESC_SET (SCU400 ,28 )); -PIN_DECL_1 (Y5 ,GPIO18D4 ,SD3DAT2 ); +SIG_EXPR_LIST_DECL_SEMG (Y5 ,EMMCDAT2 ,EMMCG4 ,EMMC ,SIG_DESC_SET (SCU400 ,28 )); +PIN_DECL_1 (Y5 ,GPIO18D4 ,EMMCDAT2 );#define AB5 237 -SIG_EXPR_LIST_DECL_SESG (AB5 ,SD3DAT3 ,SD3 ,SIG_DESC_SET (SCU400 ,29 )); -PIN_DECL_1 (AB5 ,GPIO18D5 ,SD3DAT3 ); +SIG_EXPR_LIST_DECL_SEMG (AB5 ,EMMCDAT3 ,EMMCG4 ,EMMC ,SIG_DESC_SET (SCU400 ,29 )); +PIN_DECL_1 (AB5 ,GPIO18D5 ,EMMCDAT3 );#define AB6 238 -SIG_EXPR_LIST_DECL_SESG (AB6 ,SD3CD ,SD3 ,SIG_DESC_SET (SCU400 ,30 )); -PIN_DECL_1 (AB6 ,GPIO18D6 ,SD3CD ); +SIG_EXPR_LIST_DECL_SEMG (AB6 ,EMMCCD ,EMMCG1 ,EMMC ,SIG_DESC_SET (SCU400 ,30 )); +PIN_DECL_1 (AB6 ,GPIO18D6 ,EMMCCD );#define AC5 239 -SIG_EXPR_LIST_DECL_SESG (AC5 ,SD3WP ,SD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,FWSPIDMISO ,VBMISO ,EMMCDAT7 );GROUP_DECL (FWSPID ,Y1 ,Y2 ,Y3 ,Y4 );GROUP_DECL (FWQSPID ,Y1 ,Y2 ,Y3 ,Y4 ,AE12 ,AF12 ); +GROUP_DECL (EMMCG8 ,AB4 ,AA4 ,AC4 ,AA5 ,Y5 ,AB5 ,AB6 ,AC5 ,Y1 ,Y2 ,Y3 ,Y4 );FUNC_DECL_2 (FWSPID ,FWSPID ,FWQSPID );FUNC_GROUP_DECL (VB ,Y1 ,Y2 ,Y3 ,Y4 ); - +FUNC_DECL_3 (EMMC ,EMMCG1 ,EMMCG4 ,EMMCG8 );/* * FIXME: Confirm bits and priorities are the right way around for the * following 4 pins
@@ -1968,11 +1966,9 @@ static const struct aspeed_pin_group aspeed_g6_groups[] = {ASPEED_PINCTRL_GROUP (SALT9G1 ),ASPEED_PINCTRL_GROUP (SD1 ),ASPEED_PINCTRL_GROUP (SD2 ), -ASPEED_PINCTRL_GROUP (SD3 ), -ASPEED_PINCTRL_GROUP (SD3DAT4 ), -ASPEED_PINCTRL_GROUP (SD3DAT5 ), -ASPEED_PINCTRL_GROUP (SD3DAT6 ), -ASPEED_PINCTRL_GROUP (SD3DAT7 ), +ASPEED_PINCTRL_GROUP (EMMCG1 ), +ASPEED_PINCTRL_GROUP (EMMCG4 ), +ASPEED_PINCTRL_GROUP (EMMCG8 ),ASPEED_PINCTRL_GROUP (SGPM1 ),ASPEED_PINCTRL_GROUP (SGPS1 ), ASPEED_PINCTRL_GROUP(SIOONCTRL),
@@ -2051,6 +2047,7 @@ static const struct aspeed_pin_function aspeed_g6_functions[] = {ASPEED_PINCTRL_FUNC (ADC8 ),ASPEED_PINCTRL_FUNC (ADC9 ),ASPEED_PINCTRL_FUNC (BMCINT ), +ASPEED_PINCTRL_FUNC (EMMC ),ASPEED_PINCTRL_FUNC (ESPI ),ASPEED_PINCTRL_FUNC (ESPIALT ), ASPEED_PINCTRL_FUNC(FSI1),
@@ -2183,11 +2180,6 @@ static const struct aspeed_pin_function aspeed_g6_functions[] = {ASPEED_PINCTRL_FUNC (SALT9 ),ASPEED_PINCTRL_FUNC (SD1 ),ASPEED_PINCTRL_FUNC (SD2 ), -ASPEED_PINCTRL_FUNC (SD3 ), -ASPEED_PINCTRL_FUNC (SD3DAT4 ), -ASPEED_PINCTRL_FUNC (SD3DAT5 ), -ASPEED_PINCTRL_FUNC (SD3DAT6 ), -ASPEED_PINCTRL_FUNC (SD3DAT7 ),ASPEED_PINCTRL_FUNC (SGPM1 ),ASPEED_PINCTRL_FUNC (SGPS1 ), ASPEED_PINCTRL_FUNC(SIOONCTRL),
drivers/pinctrl/aspeed/pinmux-aspeed.h +1 -0
@@ -738,6 +738,7 @@ struct aspeed_pin_desc { static const char *FUNC_SYM(func)[] = { __VA_ARGS__ }#define FUNC_DECL_2 (func, one, two) FUNC_DECL_(func, #one, #two) +#define FUNC_DECL_3 (func, one, two, three) FUNC_DECL_(func, #one, #two, #three)#define FUNC_GROUP_DECL (func, ...) \ GROUP_DECL(func, __VA_ARGS__); \
Signature · 1 line
2.20.1
Quoted 6 lines · Andrew Jeffery
Hello,
This series resolves several issues found in testing by Johnny Huang from ASPEED, who also contributed the patches to fix them. We'll have more patches from him in the near future (which I'm pretty happy about).
For the series:
These patches have been in the OpenBMC tree for a while and look good.
Cheers,
Joel
Quoted 31 lines
The major issue resolved is the way I grouped the eMMC pins. What I had was ugly and I want to get rid of it before the binding is solidified with the 5.4 release.
The remaining fixes are minor issues that stem from lack of documentation or understanding on my part, and at least one brain-fart.
Please review!
Andrew
Andrew Jeffery (4):
dt-bindings: pinctrl: aspeed-g6: Rework SD3 function and groups
pinctrl: aspeed-g6: Sort pins for sanity
pinctrl: aspeed-g6: Fix I2C14 SDA description
pinctrl: aspeed-g6: MakeSIG_DESC_CLEAR()behave intuitivelyJohnny Huang (3):
pinctrl: aspeed-g6: Fix I3C3/I3C4 pinmux configuration
pinctrl: aspeed-g6: Fix UART13 group pinmux
pinctrl: aspeed-g6: Rename SD3 to EMMC and rework pin groups.../pinctrl/aspeed,ast2600-pinctrl.yaml | 86 ++++++------ drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 124 ++++++++---------- drivers/pinctrl/aspeed/pinmux-aspeed.h | 3 +- 3 files changed, 98 insertions(+), 115 deletions(-)--
2.20.1
Quoted 7 lines · Andrew Jeffery
This series resolves several issues found in testing by Johnny Huang from ASPEED, who also contributed the patches to fix them. We'll have more patches from him in the near future (which I'm pretty happy about).
The major issue resolved is the way I grouped the eMMC pins. What I had was ugly and I want to get rid of it before the binding is solidified with the 5.4 release.
Should some of these go in with fixes? All of them? Or just some? I applied them to devel right now (for v5.5).
Quoted 2 lines
The remaining fixes are minor issues that stem from lack of documentation or understanding on my part, and at least one brain-fart.
Do they need to go in to v5.4 or not?
I need a shortlist of anything that should go into v5.4 if anything.
Yours,
Linus Walleij
Quoted 6 lines · Linus Walleij
Quoted 4 lines · Andrew Jeffery
This series resolves several issues found in testing by Johnny Huang from ASPEED, who also contributed the patches to fix them. We'll have more patches from him in the near future (which I'm pretty happy about).
Quoted 6 lines
Quoted 3 lines
The major issue resolved is the way I grouped the eMMC pins. What I had was ugly and I want to get rid of it before the binding is solidified with the 5.4 release.
Should some of these go in with fixes? All of them? Or just some? I applied them to devel right now (for v5.5).
I was hoping to get them into the 5.4 fixes branch: I consider them all fixes - the rework of the eMMC pin groups and functions is a fix for the binding. The rest are fixes for the driver itself. My preference is that they get into a release sooner rather than later.
It's there something that makes you think they shouldn't be merged as fixes for 5.4?
Quoted 7 lines
Quoted 3 lines
The remaining fixes are minor issues that stem from lack of documentation or understanding on my part, and at least one brain-fart.
Do they need to go in to v5.4 or not?
I need a shortlist of anything that should go into v5.4 if anything.
IMO all of them should go into 5.4, as above. It's there something I can do in the future to communicate this better? Explicit shortlist in the cover letter? Fixes tags on the relevant patches? Keen to make things easier/more obvious if I can.
Cheers,
Andrew
Quoted 1 line · Andrew Jeffery
I was hoping to get them into the 5.4 fixes branch: I consider them all fixes
OK I moved them all to fixes.
Quoted 3 lines
Quoted 1 line
I need a shortlist of anything that should go into v5.4 if anything.
IMO all of them should go into 5.4, as above.
OK
Quoted 1 line
It's there something I can do in the future to communicate this better?
Nah it is a complicated process, things need to be done manually at times, overly obsessing with process is counterproductive.
Yours,
Linus Walleij
Quoted 5 lines · Linus Walleij
Quoted 1 line · Andrew Jeffery
I was hoping to get them into the 5.4 fixes branch: I consider them all fixes
OK I moved them all to fixes.
Thanks.
Quoted 11 lines
Quoted 4 lines
Quoted 2 lines
I need a shortlist of anything that should go into v5.4 if anything.
IMO all of them should go into 5.4, as above.
OK
Quoted 1 line
It's there something I can do in the future to communicate this better?
Nah it is a complicated process, things need to be done manually at times, overly obsessing with process is counterproductive.
No worries, happy to carry on as is.
Andrew