aspeed/pinctrl: Fix simultaneous RS-232 / PWM and DVO outputs on AST2500 devices
Subsystems (3)
PATCH 2/3 aspeed/pinctrl: Fix simultaneous RS-232 / PWM and DVO outputs on AST2500 devices
There appears to be a small error in the pinmux table on pages 130 and 131 of the AST2500 datasheet v1.6. Specifically, the COND2 requirement used to mux the surrounding pins to DVI was inadvertently replicated to pins V1, W1, V2, and W2 in the table, which do not incorporate DVI functionality.
As a result of this error, both serial TX lines and the PWM 0/1 outputs were overriding the VPO pinmux settings when VPO was enabled in the pinmux hogs.
This patch has been verified to function on Blackbird hardware. Both serial TXD pins and PWM0/PWM1 were functionally tested with SCU94[1:0] set to 0x1.
--- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c +4 -4
@@ -696,14 +696,14 @@ FUNC_GROUP_DECL(NRTS1, P3);#define V1 94#define V1_DESC SIG_DESC_SET(SCU84, 22)SIG_EXPR_LIST_DECL_SINGLE (DASHV1 ,DASHV1 ,VPIRSVD_DESC ,V1_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (TXD1 ,TXD1 ,V1_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (TXD1 ,TXD1 ,V1_DESC );MS_PIN_DECL (V1 ,GPIOL6 ,DASHV1 ,TXD1 );FUNC_GROUP_DECL (TXD1 ,V1 );#define W1 95#define W1_DESC SIG_DESC_SET(SCU84, 23)SIG_EXPR_LIST_DECL_SINGLE (DASHW1 ,DASHW1 ,VPIRSVD_DESC ,W1_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (RXD1 ,RXD1 ,W1_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (RXD1 ,RXD1 ,W1_DESC );MS_PIN_DECL (W1 ,GPIOL7 ,DASHW1 ,RXD1 );FUNC_GROUP_DECL (RXD1 ,W1 );
@@ -766,14 +766,14 @@ FUNC_GROUP_DECL(RXD2, T5);#define V2 104#define V2_DESC SIG_DESC_SET(SCU88, 0)SIG_EXPR_LIST_DECL_SINGLE (DASHN0 ,DASHN0 ,VPIRSVD_DESC ,V2_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (PWM0 ,PWM0 ,V2_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (PWM0 ,PWM0 ,V2_DESC );MS_PIN_DECL (V2 ,GPION0 ,DASHN0 ,PWM0 );FUNC_GROUP_DECL (PWM0 ,V2 );#define W2 105#define W2_DESC SIG_DESC_SET(SCU88, 1)SIG_EXPR_LIST_DECL_SINGLE (DASHN1 ,DASHN1 ,VPIRSVD_DESC ,W2_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (PWM1 ,PWM1 ,W2_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (PWM1 ,PWM1 ,W2_DESC );MS_PIN_DECL (W2 ,GPION1 ,DASHN1 ,PWM1 );FUNC_GROUP_DECL (PWM1 ,W2 );
Signature · 1 line
2.11.0
Quoted 47 lines · Timothy Pearson
There appears to be a small error in the pinmux table on pages 130 and 131 of the AST2500 datasheet v1.6. Specifically, the COND2 requirement used to mux the surrounding pins to DVI was inadvertently replicated to pins V1, W1, V2, and W2 in the table, which do not incorporate DVI functionality.
As a result of this error, both serial TX lines and the PWM 0/1 outputs were overriding the VPO pinmux settings when VPO was enabled in the pinmux hogs.
This patch has been verified to function on Blackbird hardware. Both serial TXD pins and PWM0/PWM1 were functionally tested with SCU94[1:0] set to
0x1.Signed-off-by Timothy Pearson <[email protected]>--- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c +3
-3@@ -696,14 +696,14 @@ FUNC_GROUP_DECL(NRTS1, P3);#define V1 94#define V1_DESC SIG_DESC_SET(SCU84, 22)SIG_EXPR_LIST_DECL_SINGLE (DASHV1 ,DASHV1 ,VPIRSVD_DESC ,V1_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (TXD1 ,TXD1 ,V1_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (TXD1 ,TXD1 ,V1_DESC );MS_PIN_DECL (V1 ,GPIOL6 ,DASHV1 ,TXD1 );FUNC_GROUP_DECL (TXD1 ,V1 );#define W1 95#define W1_DESC SIG_DESC_SET(SCU84, 23)SIG_EXPR_LIST_DECL_SINGLE (DASHW1 ,DASHW1 ,VPIRSVD_DESC ,W1_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (RXD1 ,RXD1 ,W1_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (RXD1 ,RXD1 ,W1_DESC );MS_PIN_DECL (W1 ,GPIOL7 ,DASHW1 ,RXD1 );FUNC_GROUP_DECL (RXD1 ,W1 );@@ -766,14 +766,14 @@ FUNC_GROUP_DECL(RXD2, T5);#define V2 104#define V2_DESC SIG_DESC_SET(SCU88, 0)SIG_EXPR_LIST_DECL_SINGLE (DASHN0 ,DASHN0 ,VPIRSVD_DESC ,V2_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (PWM0 ,PWM0 ,V2_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (PWM0 ,PWM0 ,V2_DESC );
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c FUNC_GROUP_DECL(RXD2, T5); · line 778
Quoted 10 lines
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c +1
-1MS_PIN_DECL (V2 ,GPION0 ,DASHN0 ,PWM0 );FUNC_GROUP_DECL (PWM0 ,V2 );#define W2 105#define W2_DESC SIG_DESC_SET(SCU88, 1)SIG_EXPR_LIST_DECL_SINGLE (DASHN1 ,DASHN1 ,VPIRSVD_DESC ,W2_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (PWM1 ,PWM1 ,W2_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (PWM1 ,PWM1 ,W2_DESC );MS_PIN_DECL (W2 ,GPION1 ,DASHN1 ,PWM1 );FUNC_GROUP_DECL (PWM1 ,W2 );
This looks reasonable to me. I'd like Ryan to chime in though.
Ryan, can you confirm the datasheet needs correction here?
Tim: You need to send these to a broader audience than the linux-aspeed@ list. Please use ./scripts/get_maintainer.pl to determine the appropriate people to send to. This at least needs to go to Linus Walleij, who maintains pinctrl.
Andrew
Quoted 5 lines
Signature · 2 lines
-- 2.11.0
Ryan Chen
reviewerPATCH 2/3 aspeed/pinctrl: Fix simultaneous RS-232 / PWM and DVO outputs on AST2500 devices
Quoted 7 lines · Timothy Pearson
There appears to be a small error in the pinmux table on pages 130 and 131 of the AST2500 datasheet v1.6. Specifically, the COND2 requirement used to mux the surrounding pins to DVI was inadvertently replicated to pins V1, W1, V2, and W2 in the table, which do not incorporate DVI functionality.
Quoted 7 lines
As a result of this error, both serial TX lines and the PWM 0/1 outputs were overriding the VPO pinmux settings when VPO was enabled in the pinmux hogs.
This patch has been verified to function on Blackbird hardware. Both serial TXD pins and PWM0/PWM1 were functionally tested with SCU94[1:0] set to
0x1.
Hello Tim.
The AST2500 pwm0/1 configure need following condition, the SCU94[1:0] is 0x1, it should not work. Could you help confirm it?
v2 : pwm 0 : scu88[0] = 1 & scu 94[1:0] = 0 & scu90[5] = 0 w2 : pwm 1 : scu88[1] = 1 & scu 94[1:0] = 0 & scu90[5] = 0
Quoted 51 lines
Signed-off-by Timothy Pearson <[email protected]>--- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c +4
-4@@ -696,14 +696,14 @@ FUNC_GROUP_DECL(NRTS1, P3); #define V1 94#define V1_DESC SIG_DESC_SET(SCU84, 22)SIG_EXPR_LIST_DECL_SINGLE (DASHV1 ,DASHV1 ,VPIRSVD_DESC ,V1_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (TXD1 ,TXD1 ,V1_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (TXD1 ,TXD1 ,V1_DESC );MS_PIN_DECL (V1 ,GPIOL6 ,DASHV1 ,TXD1 );FUNC_GROUP_DECL (TXD1 ,V1 );#define W1 95#define W1_DESC SIG_DESC_SET(SCU84, 23)SIG_EXPR_LIST_DECL_SINGLE (DASHW1 ,DASHW1 ,VPIRSVD_DESC ,W1_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (RXD1 ,RXD1 ,W1_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (RXD1 ,RXD1 ,W1_DESC );MS_PIN_DECL (W1 ,GPIOL7 ,DASHW1 ,RXD1 );FUNC_GROUP_DECL (RXD1 ,W1 );@@ -766,14 +766,14 @@ FUNC_GROUP_DECL(RXD2, T5); #define V2 104#define V2_DESC SIG_DESC_SET(SCU88, 0)SIG_EXPR_LIST_DECL_SINGLE (DASHN0 ,DASHN0 ,VPIRSVD_DESC ,V2_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (PWM0 ,PWM0 ,V2_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (PWM0 ,PWM0 ,V2_DESC );MS_PIN_DECL (V2 ,GPION0 ,DASHN0 ,PWM0 );FUNC_GROUP_DECL (PWM0 ,V2 );#define W2 105#define W2_DESC SIG_DESC_SET(SCU88, 1)SIG_EXPR_LIST_DECL_SINGLE (DASHN1 ,DASHN1 ,VPIRSVD_DESC ,W2_DESC ); -SIG_EXPR_LIST_DECL_SINGLE (PWM1 ,PWM1 ,W2_DESC ,COND2 ); +SIG_EXPR_LIST_DECL_SINGLE (PWM1 ,PWM1 ,W2_DESC );MS_PIN_DECL (W2 ,GPION1 ,DASHN1 ,PWM1 );FUNC_GROUP_DECL (PWM1 ,W2 );Quoted 6 lines
This looks reasonable to me. I'd like Ryan to chime in though.
Ryan, can you confirm the datasheet needs correction here?
Tim: You need to send these to a broader audience than the linux-aspeed@ list. Please use
./scripts/get_maintainer.plto >>determine the appropriate people to send to. This at least needs to go to Linus Walleij, who maintains pinctrl.--
2.11.0
PATCH 2/3 aspeed/pinctrl: Fix simultaneous RS-232 / PWM and DVO outputs on AST2500 devices
----- Original Message -----
Quoted 22 lines
From: "Ryan Chen" <[email protected]>
To: "Andrew Jeffery" <[email protected]>, "Timothy Pearson" <[email protected]>, "linux-aspeed" <[email protected]>
Cc: "Morris Mao" <[email protected]>
Sent: Wednesday, May 1, 2019 10:06:25 PM
Subject: RE: [PATCH 2/3] aspeed/pinctrl: Fix simultaneous RS-232 / PWM and DVO outputs on AST2500 devicesQuoted 7 lines · Timothy Pearson
There appears to be a small error in the pinmux table on pages 130 and 131 of the AST2500 datasheet v1.6. Specifically, the COND2 requirement used to mux the surrounding pins to DVI was inadvertently replicated to pins V1, W1, V2, and W2 in the table, which do not incorporate DVI functionality.
Quoted 7 lines
As a result of this error, both serial TX lines and the PWM 0/1 outputs were overriding the VPO pinmux settings when VPO was enabled in the pinmux hogs.
This patch has been verified to function on Blackbird hardware. Both serial TXD pins and PWM0/PWM1 were functionally tested with SCU94[1:0] set to
0x1.
Quoted 8 lines
Hello Tim.
The AST2500 pwm0/1 configure need following condition, the SCU94[1:0] is
0x1, it should not work.
Could you help confirm it?v2 : pwm 0 : scu88[0] = 1 & scu 94[1:0] = 0 & scu90[5] = 0 w2 : pwm 1 : scu88[1] = 1 & scu 94[1:0] = 0 & scu90[5] = 0
I can confirm that with SCU94[1:0] == 0x1 the PWM0 and PWM1 outputs work correctly -- this was tested on our Blackbird hardware. If you are reading from the datasheet, I suspect there are a few errors in it relating to the relatively rarely used DVO mux settings.
Ryan Chen
reviewerPATCH 2/3 aspeed/pinctrl: Fix simultaneous RS-232 / PWM and DVO outputs on AST2500 devices
----- Original Message -----
Quoted 24 lines
From: "Ryan Chen" <[email protected]>
To: "Andrew Jeffery" <[email protected]>, "Timothy Pearson" <[email protected]>, "linux-aspeed" <[email protected]>
Cc: "Morris Mao" <[email protected]>
Sent: Wednesday, May 1, 2019 10:06:25 PM
Subject: RE: [PATCH 2/3] aspeed/pinctrl: Fix simultaneous RS-232 / PWM
and DVO outputs on AST2500 devicesQuoted 8 lines · Timothy Pearson
There appears to be a small error in the pinmux table on pages 130 and
131 of the AST2500 datasheet v1.6. Specifically, the COND2 requirement used to mux the surrounding pins to DVI was inadvertently replicated to pins V1, W1, V2, and W2 in the table, which do not incorporate DVI functionality.Quoted 7 lines
As a result of this error, both serial TX lines and the PWM 0/1 outputs were overriding the VPO pinmux settings when VPO was enabled in the pinmux hogs.
This patch has been verified to function on Blackbird hardware. Both serial TXD pins and PWM0/PWM1 were functionally tested with SCU94[1:0] set to
0x1.
Quoted 10 lines
Hello Tim.
The AST2500 pwm0/1 configure need following condition, the SCU94[1:0] is
0x1, it should not work.
Could you help confirm it?v2 : pwm 0 : scu88[0] = 1 & scu 94[1:0] = 0 & scu90[5] = 0 w2 : pwm 1 : scu88[1] = 1 & scu 94[1:0] = 0 & scu90[5] = 0
Quoted 1 line
I can confirm that with SCU94[1:0] ==
0x1the PWM0 and PWM1 outputs work correctly -- this was tested on our Blackbird >>hardware. If you are reading from the datasheet, I suspect there are a few errors in it relating to the relatively rarely used DVO >>mux settings.
Yes it can work after check with designer, if you don't enable the CRT driver, it will work. But for safety. You need also and with COND2 for pwm driver loaded.
Quoted 31 lines · Ryan Chen
----- Original Message -----
Quoted 30 lines
From: "Ryan Chen" <[email protected]>
To: "Andrew Jeffery" <[email protected]>, "Timothy Pearson" <[email protected]>, "linux-aspeed" <[email protected]>
Cc: "Morris Mao" <[email protected]>
Sent: Wednesday, May 1, 2019 10:06:25 PM
Subject: RE: [PATCH 2/3] aspeed/pinctrl: Fix simultaneous RS-232 / PWM
and DVO outputs on AST2500 devicesQuoted 8 lines · Timothy Pearson
There appears to be a small error in the pinmux table on pages 130 and
131 of the AST2500 datasheet v1.6. Specifically, the COND2 requirement used to mux the surrounding pins to DVI was inadvertently replicated to pins V1, W1, V2, and W2 in the table, which do not incorporate DVI functionality.Quoted 7 lines
As a result of this error, both serial TX lines and the PWM 0/1 outputs were overriding the VPO pinmux settings when VPO was enabled in the pinmux hogs.
This patch has been verified to function on Blackbird hardware. Both serial TXD pins and PWM0/PWM1 were functionally tested with SCU94[1:0] set to
0x1.Hello Tim.
The AST2500 pwm0/1 configure need following condition, the SCU94[1:0] is
0x1, it should not work.
Could you help confirm it?
Quoted 8 lines
Quoted 4 lines
v2 : pwm 0 : scu88[0] = 1 & scu 94[1:0] = 0 & scu90[5] = 0 w2 : pwm 1 : scu88[1] = 1 & scu 94[1:0] = 0 & scu90[5] = 0
Quoted 1 line
I can confirm that with SCU94[1:0] ==
0x1the PWM0 and PWM1 outputs work correctly -- this was tested on our Blackbird >>hardware. If you are reading from the datasheet, I suspect there are a few errors in it relating to the relatively rarely used DVO >>mux settings.Yes it can work after check with designer, if you don't enable the CRT driver, it will work.
But for safety.
What do you mean by "for safety"?
Quoted 1 line
You need also and with COND2 for pwm driver loaded.
I'm confused here because it sounds like from Tim's experiment PWM0 / PWM1 work without the dependency on COND2 despite VPO being enabled, and the designer confirms as much, but we shouldn't do it?
Regardless, in summary you're saying that for TXD1 and RXD1 the change to remove the dependence on COND2 is appropriate, but not for PWM0 and PWM1?
Andrew
Quoted 3 lines
Ryan Chen
reviewerPATCH 2/3 aspeed/pinctrl: Fix simultaneous RS-232 / PWM and DVO outputs on AST2500 devices
Quoted 31 lines
----- Original Message -----
Quoted 30 lines
From: "Ryan Chen" <[email protected]>
To: "Andrew Jeffery" <[email protected]>, "Timothy Pearson" <[email protected]>, "linux-aspeed" <[email protected]>
Cc: "Morris Mao" <[email protected]>
Sent: Wednesday, May 1, 2019 10:06:25 PM
Subject: RE: [PATCH 2/3] aspeed/pinctrl: Fix simultaneous RS-232 /
PWM and DVO outputs on AST2500 devicesQuoted 8 lines · Timothy Pearson
There appears to be a small error in the pinmux table on pages 130 and
131 of the AST2500 datasheet v1.6. Specifically, the COND2 requirement used to mux the surrounding pins to DVI was inadvertently replicated to pins V1, W1, V2, and W2 in the table, which do not incorporate DVI functionality.Quoted 7 lines
As a result of this error, both serial TX lines and the PWM 0/1 outputs were overriding the VPO pinmux settings when VPO was enabled in the pinmux hogs.
This patch has been verified to function on Blackbird hardware. Both serial TXD pins and PWM0/PWM1 were functionally tested with SCU94[1:0] set to
0x1.Hello Tim.
The AST2500 pwm0/1 configure need following condition, the SCU94[1:0] is
0x1, it should not work.
Could you help confirm it?
Quoted 10 lines
Quoted 4 lines
v2 : pwm 0 : scu88[0] = 1 & scu 94[1:0] = 0 & scu90[5] = 0 w2 : pwm 1 : scu88[1] = 1 & scu 94[1:0] = 0 & scu90[5] = 0
Quoted 1 line
I can confirm that with SCU94[1:0] ==
0x1the PWM0 and PWM1 outputs work correctly -- this was tested on our Blackbird >>hardware. If you are reading from the datasheet, I suspect there are a few errors in it relating to the relatively rarely used DVO >>mux settings.Yes it can work after check with designer, if you don't enable the CRT driver, it will work.
But for safety.Quoted 1 line
What do you mean by "for safety"?
Sorry, my point is if gfx driver also loaded, it will impact.
But, It is ok for this modification. Due to pinctrl gfx pwm is separate driver setting.
Quoted 9 lines
You need also and with COND2 for pwm driver loaded.
Quoted 3 lines
I'm confused here because it sounds like from Tim's experiment PWM0 / PWM1 work without the dependency on COND2 >>despite VPO being enabled, and the designer confirms as much, but we shouldn't do it?
Regardless, in summary you're saying that for TXD1 and RXD1 the change to remove the dependence on COND2 is appropriate, but not for PWM0 and PWM1?
Quoted 36 lines · Ryan Chen
Quoted 36 lines
----- Original Message -----
Quoted 34 lines
From: "Ryan Chen" <[email protected]>
To: "Andrew Jeffery" <[email protected]>, "Timothy Pearson" <[email protected]>, "linux-aspeed" <[email protected]>
Cc: "Morris Mao" <[email protected]>
Sent: Wednesday, May 1, 2019 10:06:25 PM
Subject: RE: [PATCH 2/3] aspeed/pinctrl: Fix simultaneous RS-232 /
PWM and DVO outputs on AST2500 devicesQuoted 8 lines · Timothy Pearson
There appears to be a small error in the pinmux table on pages 130 and
131 of the AST2500 datasheet v1.6. Specifically, the COND2 requirement used to mux the surrounding pins to DVI was inadvertently replicated to pins V1, W1, V2, and W2 in the table, which do not incorporate DVI functionality.Quoted 7 lines
As a result of this error, both serial TX lines and the PWM 0/1 outputs were overriding the VPO pinmux settings when VPO was enabled in the pinmux hogs.
This patch has been verified to function on Blackbird hardware. Both serial TXD pins and PWM0/PWM1 were functionally tested with SCU94[1:0] set to
0x1.Hello Tim.
The AST2500 pwm0/1 configure need following condition, the SCU94[1:0] is
0x1, it should not work.
Could you help confirm it?v2 : pwm 0 : scu88[0] = 1 & scu 94[1:0] = 0 & scu90[5] = 0 w2 : pwm 1 : scu88[1] = 1 & scu 94[1:0] = 0 & scu90[5] = 0
Quoted 1 line
I can confirm that with SCU94[1:0] ==
0x1the PWM0 and PWM1 outputs work correctly -- this was tested on our Blackbird >>hardware. If you are reading from the datasheet, I suspect there are a few errors in it relating to the relatively rarely used DVO >>mux settings.
Quoted 8 lines
Quoted 5 lines
Yes it can work after check with designer, if you don't enable the CRT driver, it will work.
But for safety.Quoted 1 line
What do you mean by "for safety"?
Sorry, my point is if gfx driver also loaded, it will impact. But, It is ok for this modification.
Okay, that's enough confirmation for the moment.
Quoted 14 lines
Due to pinctrl gfx pwm is separate
driver setting.Quoted 9 lines
You need also and with COND2 for pwm driver loaded.
Quoted 3 lines
I'm confused here because it sounds like from Tim's experiment PWM0 / PWM1 work without the dependency on COND2 >>despite VPO being enabled, and the designer confirms as much, but we shouldn't do it?
Regardless, in summary you're saying that for TXD1 and RXD1 the change to remove the dependence on COND2 is appropriate, but not for PWM0 and PWM1?