@@ -226,6 +226,10 @@ static const char *const tps65224_nerr_mcu_func_group_names[] = {
226226 "GPIO5" ,
227227};
228228
229+ static const char * const tps652g1_cs_spi_func_group_names [] = {
230+ "GPIO1" ,
231+ };
232+
229233struct tps6594_pinctrl_function {
230234 struct pinfunction pinfunction ;
231235 u8 muxval ;
@@ -287,6 +291,18 @@ static const struct tps6594_pinctrl_function tps65224_pinctrl_functions[] = {
287291 FUNCTION (tps65224 , nerr_mcu , TPS65224_PINCTRL_NERR_MCU_FUNCTION ),
288292};
289293
294+ static const struct tps6594_pinctrl_function tps652g1_pinctrl_functions [] = {
295+ FUNCTION (tps65224 , gpio , TPS6594_PINCTRL_GPIO_FUNCTION ),
296+ FUNCTION (tps65224 , sda_i2c2_sdo_spi , TPS65224_PINCTRL_SDA_I2C2_SDO_SPI_FUNCTION ),
297+ FUNCTION (tps65224 , nsleep2 , TPS65224_PINCTRL_NSLEEP2_FUNCTION ),
298+ FUNCTION (tps65224 , nint , TPS65224_PINCTRL_NINT_FUNCTION ),
299+ FUNCTION (tps652g1 , cs_spi , TPS65224_PINCTRL_SCL_I2C2_CS_SPI_FUNCTION ),
300+ FUNCTION (tps65224 , nsleep1 , TPS65224_PINCTRL_NSLEEP1_FUNCTION ),
301+ FUNCTION (tps65224 , pb , TPS65224_PINCTRL_PB_FUNCTION ),
302+ FUNCTION (tps65224 , wkup , TPS65224_PINCTRL_WKUP_FUNCTION ),
303+ FUNCTION (tps65224 , syncclkin , TPS65224_PINCTRL_SYNCCLKIN_FUNCTION ),
304+ };
305+
290306struct tps6594_pinctrl {
291307 struct tps6594 * tps ;
292308 struct gpio_regmap * gpio_regmap ;
@@ -300,6 +316,16 @@ struct tps6594_pinctrl {
300316 struct muxval_remap * remap ;
301317};
302318
319+ static struct tps6594_pinctrl tps652g1_template_pinctrl = {
320+ .funcs = tps652g1_pinctrl_functions ,
321+ .func_cnt = ARRAY_SIZE (tps652g1_pinctrl_functions ),
322+ .pins = tps65224_pins ,
323+ .num_pins = ARRAY_SIZE (tps65224_pins ),
324+ .mux_sel_mask = TPS65224_MASK_GPIO_SEL ,
325+ .remap = tps65224_muxval_remap ,
326+ .remap_cnt = ARRAY_SIZE (tps65224_muxval_remap ),
327+ };
328+
303329static struct tps6594_pinctrl tps65224_template_pinctrl = {
304330 .funcs = tps65224_pinctrl_functions ,
305331 .func_cnt = ARRAY_SIZE (tps65224_pinctrl_functions ),
@@ -475,6 +501,15 @@ static int tps6594_pinctrl_probe(struct platform_device *pdev)
475501 return - ENOMEM ;
476502
477503 switch (tps -> chip_id ) {
504+ case TPS652G1 :
505+ pctrl_desc -> pins = tps65224_pins ;
506+ pctrl_desc -> npins = ARRAY_SIZE (tps65224_pins );
507+
508+ * pinctrl = tps652g1_template_pinctrl ;
509+
510+ config .ngpio = ARRAY_SIZE (tps65224_gpio_func_group_names );
511+ config .ngpio_per_reg = TPS65224_NGPIO_PER_REG ;
512+ break ;
478513 case TPS65224 :
479514 pctrl_desc -> pins = tps65224_pins ;
480515 pctrl_desc -> npins = ARRAY_SIZE (tps65224_pins );
0 commit comments