Skip to contentSkip to conversation

gpio: pca953x: Add support for Exar/MaxLinear's XRA1200 / XRA1200P

PATCH In review Uwe Kleine-König 2 participants 2 messages Oct 26 – Oct 28 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gpio: pca953x: Add support for Exar/MaxLinear's XRA1200 / XRA1200P

These are documented to be compatible with PCA9534 and PCA9554 respectively. The difference between XRA1200 and XRA1200P is, that the latter has the configurable pull-ups enabled upon power-up.

The chip was initially built by Exar which was bought by MaxLinear in 2017 and the parts were rebranded.

Datasheet available at https://www.maxlinear.com/ds/xra1200.pdf.

---
Changes since (implicit) v1, available at
https://lore.kernel.org/linux-gpio/[email protected]:

- add PCA_INT to i2c_device_id array
- use 'exar' as vendor in the of_device_id array as they created the part initially.

 drivers/gpio/gpio-pca953x.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpio/gpio-pca953x.c +5 -1
index afec5ec23696..721f17cee89d 100644
@@ -124,6 +124,8 @@ static const struct i2c_device_id pca953x_id[] = {
 	{ .name = "tca9538", .driver_data = 8  | PCA953X_TYPE | PCA_INT },
 	{ .name = "tca9539", .driver_data = 16 | PCA953X_TYPE | PCA_INT },
 	{ .name = "tca9554", .driver_data = 8  | PCA953X_TYPE | PCA_INT },
+	{ .name = "xra1200", .driver_data = 8  | PCA953X_TYPE | PCA_INT },
+	{ .name = "xra1200p", .driver_data = 8 | PCA953X_TYPE | PCA_INT },
 	{ .name = "xra1202", .driver_data = 8  | PCA953X_TYPE },
 
 	{ .name = "tcal6408", .driver_data = 8  | PCA953X_TYPE | PCA_LATCH_INT },
@@ -1508,7 +1510,9 @@ static const struct of_device_id pca953x_dt_ids[] = {
 	{ .compatible = "onnn,pca9654", .data = OF_953X( 8, PCA_INT), },
 	{ .compatible = "onnn,pca9655", .data = OF_953X(16, PCA_INT), },
 
-	{ .compatible = "exar,xra1202", .data = OF_953X( 8, 0), },
+	{ .compatible = "exar,xra1200",  .data = OF_953X( 8, PCA_INT), },
+	{ .compatible = "exar,xra1200p", .data = OF_953X( 8, PCA_INT), },
+	{ .compatible = "exar,xra1202",  .data = OF_953X( 8, 0), },
 	{ }
 };
 

base-commit: bd1ecbb61afefc6a8b876ccbc31e9228b44e9eab

Signature · 1 line
2.47.3
#1 lore raw
Quoted 35 lines · Uwe Kleine-König

These are documented to be compatible with PCA9534 and PCA9554 respectively. The difference between XRA1200 and XRA1200P is, that the latter has the configurable pull-ups enabled upon power-up.

The chip was initially built by Exar which was bought by MaxLinear in 2017 and the parts were rebranded.

Datasheet available at https://www.maxlinear.com/ds/xra1200.pdf.

---
Changes since (implicit) v1, available at
https://lore.kernel.org/linux-gpio/[email protected]:

- add PCA_INT to i2c_device_id array
- use 'exar' as vendor in the of_device_id array as they created the part initially.

 drivers/gpio/gpio-pca953x.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpio/gpio-pca953x.c +2 -0
index afec5ec23696..721f17cee89d 100644
@@ -124,6 +124,8 @@ static const struct i2c_device_id pca953x_id[] = {
 	{ .name = "tca9538", .driver_data = 8  | PCA953X_TYPE | PCA_INT },
 	{ .name = "tca9539", .driver_data = 16 | PCA953X_TYPE | PCA_INT },
 	{ .name = "tca9554", .driver_data = 8  | PCA953X_TYPE | PCA_INT },
+	{ .name = "xra1200", .driver_data = 8  | PCA953X_TYPE | PCA_INT },
+	{ .name = "xra1200p", .driver_data = 8 | PCA953X_TYPE | PCA_INT },
 	{ .name = "xra1202", .driver_data = 8  | PCA953X_TYPE },
 
 	{ .name = "tcal6408", .driver_data = 8  | PCA953X_TYPE | PCA_LATCH_INT },

drivers/gpio/gpio-pca953x.c static const struct of_device_id pca953x_dt_ids[] = { · line 1514

Quoted 6 lines
drivers/gpio/gpio-pca953x.c +2 -1
@@ -1508,7 +1510,9 @@ static const struct of_device_id pca953x_dt_ids[] = {
 	{ .compatible = "onnn,pca9654", .data = OF_953X( 8, PCA_INT), },
 	{ .compatible = "onnn,pca9655", .data = OF_953X(16, PCA_INT), },
 
-	{ .compatible = "exar,xra1202", .data = OF_953X( 8, 0), },
+	{ .compatible = "exar,xra1200",  .data = OF_953X( 8, PCA_INT), },
+	{ .compatible = "exar,xra1200p", .data = OF_953X( 8, PCA_INT), },

These two need a dt binding change as well.

Bart

Quoted 10 lines
drivers/gpio/gpio-pca953x.c +1 -0
+	{ .compatible = "exar,xra1202",  .data = OF_953X( 8, 0), },
 	{ }
 };
 

base-commit: bd1ecbb61afefc6a8b876ccbc31e9228b44e9eab --
2.47.3