galp6: Do not provide power while off
The previous commit incorrectly enabled power while off. Model PD_EN
after VA_EC_EN, which it replaced on galp6 for TCP0.
Fixes: a6a6c5fba4 ("galp6: Fix TCP0 power")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
			
			
This commit is contained in:
		
				
					committed by
					
						 Tim Crawford
						Tim Crawford
					
				
			
			
				
	
			
			
			
						parent
						
							a6a6c5fba4
						
					
				
				
					commit
					a8213311b1
				
			| @@ -73,6 +73,11 @@ | ||||
|     #define HAVE_VA_EC_EN 1 | ||||
| #endif | ||||
|  | ||||
| // Only galp6 has this, so disable by default. | ||||
| #ifndef HAVE_PD_EN | ||||
|     #define HAVE_PD_EN 0 | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_XLP_OUT | ||||
|     #define HAVE_XLP_OUT 1 | ||||
| #endif | ||||
| @@ -184,6 +189,9 @@ void power_on(void) { | ||||
|     // avoid leakage | ||||
|     GPIO_SET_DEBUG(VA_EC_EN, true); | ||||
| #endif // HAVE_VA_EC_EN | ||||
| #if HAVE_PD_EN | ||||
|     GPIO_SET_DEBUG(PD_EN, true); | ||||
| #endif | ||||
|     tPCH06; | ||||
|  | ||||
|     // Enable VDD5 | ||||
| @@ -267,6 +275,9 @@ void power_off(void) { | ||||
|     GPIO_SET_DEBUG(DD_ON, false); | ||||
|     tPCH12; | ||||
|  | ||||
| #if HAVE_PD_EN | ||||
|     GPIO_SET_DEBUG(PD_EN, false); | ||||
| #endif | ||||
| #if HAVE_VA_EC_EN | ||||
|     // Disable VCCPRIM_* planes | ||||
|     GPIO_SET_DEBUG(VA_EC_EN, false); | ||||
|   | ||||
| @@ -25,6 +25,7 @@ struct Gpio __code LED_PWR =        GPIO(D, 0); | ||||
| struct Gpio __code LID_SW_N =       GPIO(B, 1); | ||||
| struct Gpio __code PCH_DPWROK_EC =  GPIO(C, 5); | ||||
| struct Gpio __code PCH_PWROK_EC =   GPIO(A, 6); | ||||
| struct Gpio __code PD_EN =          GPIO(F, 3); | ||||
| struct Gpio __code PM_PWROK =       GPIO(C, 6); | ||||
| struct Gpio __code PWR_BTN_N =      GPIO(D, 5); | ||||
| struct Gpio __code PWR_SW_N =       GPIO(B, 3); | ||||
| @@ -72,8 +73,8 @@ void gpio_init(void) { | ||||
|     GPDRD = BIT(5) | BIT(4); | ||||
|     // USB_PWR_EN | ||||
|     GPDRE = BIT(3); | ||||
|     // H_PECI, PD_EN | ||||
|     GPDRF = BIT(6) | BIT(3); | ||||
|     // H_PECI | ||||
|     GPDRF = BIT(6); | ||||
|     // H_PROCHOT_EC | ||||
|     GPDRG = BIT(6); | ||||
|     GPDRH = 0; | ||||
|   | ||||
| @@ -30,6 +30,8 @@ extern struct Gpio __code LED_PWR; | ||||
| extern struct Gpio __code LID_SW_N; | ||||
| extern struct Gpio __code PCH_DPWROK_EC; | ||||
| extern struct Gpio __code PCH_PWROK_EC; | ||||
| #define HAVE_PD_EN 1 | ||||
| extern struct Gpio __code PD_EN; | ||||
| extern struct Gpio __code PM_PWROK; | ||||
| extern struct Gpio __code PWR_BTN_N; | ||||
| extern struct Gpio __code PWR_SW_N; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user