File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,17 @@ static void pinctrl_configure_pin(const pinctrl_soc_pin_t *pin)
45
45
pin_config .GP .cfg_b .eDriveStrength = pin -> drive_strength ;
46
46
#if defined(CONFIG_SOC_SERIES_APOLLO4X )
47
47
pin_config .GP .cfg_b .uSlewRate = pin -> slew_rate ;
48
+ switch (pin -> sdif_cdwp ) {
49
+ case 1 :
50
+ am_hal_gpio_cd_pin_config (pin -> pin_num );
51
+ break ;
52
+ case 2 :
53
+ am_hal_gpio_wp_pin_config (pin -> pin_num );
54
+ break ;
55
+ default :
56
+ /* not a sdif pin */
57
+ break ;
58
+ }
48
59
#else
49
60
switch (pin -> sdif_cdwp ) {
50
61
case 1 :
Original file line number Diff line number Diff line change @@ -161,3 +161,11 @@ child-binding:
161
161
Polarity select for NCE
162
162
LOW = 0x0 - Polarity is active low
163
163
HIGH = 0x1 - Polarity is active high
164
+ ambiq,sdif-cdwp :
165
+ type : int
166
+ default : 0
167
+ description : |
168
+ Configure SD Card Detection and Write Protection pin
169
+ 0x0 - Not SDIF pin
170
+ 0x1 - SDIFCD
171
+ 0x2 - SDIFWP
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ struct apollo4_pinctrl_soc_pin {
39
39
uint32_t nce : 6 ;
40
40
/** nCE module polarity */
41
41
uint32_t nce_pol : 1 ;
42
+ /** SDIF CD WP pad select */
43
+ uint32_t sdif_cdwp : 2 ;
42
44
};
43
45
44
46
typedef struct apollo4_pinctrl_soc_pin pinctrl_soc_pin_t ;
@@ -65,6 +67,7 @@ typedef struct apollo4_pinctrl_soc_pin pinctrl_soc_pin_t;
65
67
DT_ENUM_IDX(node_id, ambiq_pull_up_ohms), \
66
68
DT_PROP(node_id, ambiq_nce_src), \
67
69
DT_PROP(node_id, ambiq_nce_pol), \
70
+ DT_PROP(node_id, ambiq_sdif_cdwp), \
68
71
},
69
72
70
73
/**
You can’t perform that action at this time.
0 commit comments