Skip to contentSkip to conversation

i2c: muxes: pca954x: update list of supported devices

PATCH New Luca Ceresoli 3 participants 12 messages Apr 9, 2019 – Apr 10, 2019 I2C muxes

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 i2c: muxes: pca954x: update list of supported devices

The Kconfig help has not been updated while adding PCA9547 and PCA9646.

---

Changes v1 -> v2:
- add missing comma (Michal)
- reword and rewrap the sentence

---
 drivers/i2c/muxes/Kconfig | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/i2c/muxes/Kconfig +5 -5
index b0da67ce2c6b..4a601c88b78f 100644
@@ -29,11 +29,11 @@ config I2C_MUX_PCA954x
 	tristate "TI PCA954x I2C Mux/switches"
 	depends on I2C_MUX
 	help
-	  If you say yes here you get support for the TI PCA954x
-	  I2C mux/switch devices. It is x width I2C multiplexer which enables to
-	  partitioning I2C bus and connect multiple devices with the same address
-	  to the same I2C controller where driver handles proper routing to
-	  target i2c device. PCA9544 and PCA9548 are supported.
+	  If you say yes here you get support for the TI PCA954x I2C mux/switch
+	  devices. It is x width I2C multiplexer which enables to partitioning
+	  I2C bus and connect multiple devices with the same address to the same
+	  I2C controller where driver handles proper routing to target i2c
+	  device. Supported chips are PCA9544, PCA9547, PCA9548 and PCA9646.
 
 config I2C_MUX_GPIO
         tristate "GPIO-based I2C multiplexer"
Signature · 1 line
2.21.0
#1 lore raw

PATCH v2 2/3 i2c: muxes: pca954x: clarify enable field

The chip_desc.enable field is used only for muxes, not for switches. Document it and remove the unused values.

---

Changes v1 -> v2:
- fix typo in commit message (Michal)

---
 drivers/i2c/muxes/pca954x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/i2c/muxes/pca954x.c +1 -3
index bd4e9abe5f3c..5669753ce14d 100644
@@ -22,7 +22,7 @@ enum pca_type {
 };
 
 struct chip_desc {
-	u8 enable;
+	u8 enable; /* Enable mask in ctl register (used for muxes only) */
 	enum muxtype {
 		pca954x_ismux = 0,
 		pca954x_isswi,
@@ -48,12 +48,10 @@ static const struct chip_desc chips[] = {
 		.width = 8,
 	},
 	[PCA9548] = {
-		.enable = 0x8,
 		.muxtype = pca954x_isswi,
 		.width = 8,
 	},
 	[PCA9646] = {
-		.enable = 0x0,
 		.muxtype = pca954x_isswi,
 		.width = 4,
 	},
Signature · 1 line
2.21.0
#2 lore raw

PATCH v2 2/3 i2c: muxes: pca954x: clarify enable field

Quoted 31 lines · Luca Ceresoli

The chip_desc.enable field is used only for muxes, not for switches. Document it and remove the unused values.

---

Changes v1 -> v2:
- fix typo in commit message (Michal)

---
 drivers/i2c/muxes/pca954x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/i2c/muxes/pca954x.c +1 -1
index bd4e9abe5f3c..5669753ce14d 100644
@@ -22,7 +22,7 @@ enum pca_type {
 };
 
 struct chip_desc {
-	u8 enable;
+	u8 enable; /* Enable mask in ctl register (used for muxes only) */
 	enum muxtype {
 		pca954x_ismux = 0,
 		pca954x_isswi,
@@ -48,12 +48,10 @@ static const struct chip_desc chips[] = {
 		.width = 8,
 	},

drivers/i2c/muxes/pca954x.c static const struct chip_desc chips[] = { · line 57

Quoted 10 lines
drivers/i2c/muxes/pca954x.c +0 -2
 	[PCA9548] = {
-		.enable = 0x8,
 		.muxtype = pca954x_isswi,
 		.width = 8,
 	},
 	[PCA9646] = {
-		.enable = 0x0,
 		.muxtype = pca954x_isswi,
 		.width = 4,
 	},

Thanks,
Michal

#3 lore raw

PATCH v2 2/3 i2c: muxes: pca954x: clarify enable field

In reply to Luca Ceresoli

Hello Luca,

Am 09.04.2019 um 08:57 schrieb Luca Ceresoli:

Quoted 6 lines

The chip_desc.enable field is used only for muxes, not for switches. Document it and remove the unused values.

Quoted 7 lines

---

Changes v1 -> v2:
- fix typo in commit message (Michal)

---
  drivers/i2c/muxes/pca954x.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#4 lore raw

PATCH v2 2/3 i2c: muxes: pca954x: clarify enable field

In reply to Luca Ceresoli

Hello Luca,

Am 09.04.2019 um 08:57 schrieb Luca Ceresoli:

Quoted 6 lines

The chip_desc.enable field is used only for muxes, not for switches. Document it and remove the unused values.

Quoted 7 lines

---

Changes v1 -> v2:
- fix typo in commit message (Michal)

---
  drivers/i2c/muxes/pca954x.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

Applied to u-boot-i2c.git master

Thanks!

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#5 lore raw

PATCH v2 3/3 i2c: muxes: pca954x: support PCA9543 I2C switch

In reply to Luca Ceresoli

The PCA9543 is a 2-channel I2C switch.

---

Changes v1 -> v2:
- rebase on current tree

---
 drivers/i2c/muxes/Kconfig   | 3 ++-
 drivers/i2c/muxes/pca954x.c | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/i2c/muxes/Kconfig +2 -1
index 4a601c88b78f..68f15261be77 100644
@@ -33,7 +33,8 @@ config I2C_MUX_PCA954x
 	  devices. It is x width I2C multiplexer which enables to partitioning
 	  I2C bus and connect multiple devices with the same address to the same
 	  I2C controller where driver handles proper routing to target i2c
-	  device. Supported chips are PCA9544, PCA9547, PCA9548 and PCA9646.
+	  device. Supported chips are PCA9543, PCA9544, PCA9547, PCA9548 and
+	  PCA9646.
 
 config I2C_MUX_GPIO
         tristate "GPIO-based I2C multiplexer"
drivers/i2c/muxes/pca954x.c +6 -0
index 5669753ce14d..a630ce991d04 100644
@@ -15,6 +15,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 enum pca_type {
+	PCA9543,
 	PCA9544,
 	PCA9547,
 	PCA9548,
@@ -37,6 +38,10 @@ struct pca954x_priv {
 };
 
 static const struct chip_desc chips[] = {
+	[PCA9543] = {
+		.muxtype = pca954x_isswi,
+		.width = 2,
+	},
 	[PCA9544] = {
 		.enable = 0x4,
 		.muxtype = pca954x_ismux,
@@ -87,6 +92,7 @@ static const struct i2c_mux_ops pca954x_ops = {
 };
 
 static const struct udevice_id pca954x_ids[] = {
+	{ .compatible = "nxp,pca9543", .data = PCA9543 },
 	{ .compatible = "nxp,pca9544", .data = PCA9544 },
 	{ .compatible = "nxp,pca9547", .data = PCA9547 },
 	{ .compatible = "nxp,pca9548", .data = PCA9548 },
Signature · 1 line
2.21.0
#6 lore raw

PATCH v2 3/3 i2c: muxes: pca954x: support PCA9543 I2C switch

Quoted 53 lines · Luca Ceresoli

The PCA9543 is a 2-channel I2C switch.

---

Changes v1 -> v2:
- rebase on current tree

---
 drivers/i2c/muxes/Kconfig   | 3 ++-
 drivers/i2c/muxes/pca954x.c | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/i2c/muxes/Kconfig +2 -1
index 4a601c88b78f..68f15261be77 100644
@@ -33,7 +33,8 @@ config I2C_MUX_PCA954x
 	  devices. It is x width I2C multiplexer which enables to partitioning
 	  I2C bus and connect multiple devices with the same address to the same
 	  I2C controller where driver handles proper routing to target i2c
-	  device. Supported chips are PCA9544, PCA9547, PCA9548 and PCA9646.
+	  device. Supported chips are PCA9543, PCA9544, PCA9547, PCA9548 and
+	  PCA9646.
 
 config I2C_MUX_GPIO
         tristate "GPIO-based I2C multiplexer"
drivers/i2c/muxes/pca954x.c +5 -0
index 5669753ce14d..a630ce991d04 100644
@@ -15,6 +15,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 enum pca_type {
+	PCA9543,
 	PCA9544,
 	PCA9547,
 	PCA9548,
@@ -37,6 +38,10 @@ struct pca954x_priv {
 };
 
 static const struct chip_desc chips[] = {
+	[PCA9543] = {
+		.muxtype = pca954x_isswi,
+		.width = 2,
+	},
 	[PCA9544] = {
 		.enable = 0x4,
 		.muxtype = pca954x_ismux,

drivers/i2c/muxes/pca954x.c static const struct i2c_mux_ops pca954x_ops = { · line 98

Quoted 7 lines
drivers/i2c/muxes/pca954x.c +1 -0
@@ -87,6 +92,7 @@ static const struct i2c_mux_ops pca954x_ops = {
 };
 
 static const struct udevice_id pca954x_ids[] = {
+	{ .compatible = "nxp,pca9543", .data = PCA9543 },
 	{ .compatible = "nxp,pca9544", .data = PCA9544 },
 	{ .compatible = "nxp,pca9547", .data = PCA9547 },
 	{ .compatible = "nxp,pca9548", .data = PCA9548 },

Thanks,
Michal

#7 lore raw

PATCH v2 3/3 i2c: muxes: pca954x: support PCA9543 I2C switch

In reply to Luca Ceresoli

Hello Luca,

Am 09.04.2019 um 08:57 schrieb Luca Ceresoli:

Quoted 5 lines

The PCA9543 is a 2-channel I2C switch.

Quoted 8 lines

---

Changes v1 -> v2:
- rebase on current tree

---
  drivers/i2c/muxes/Kconfig   | 3 ++-
  drivers/i2c/muxes/pca954x.c | 6 ++++++
  2 files changed, 8 insertions(+), 1 deletion(-)

bye,
Heiko

Signature · 4 lines
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#8 lore raw

PATCH v2 3/3 i2c: muxes: pca954x: support PCA9543 I2C switch

In reply to Luca Ceresoli

Hello Luca,

Am 09.04.2019 um 08:57 schrieb Luca Ceresoli:

Quoted 5 lines

The PCA9543 is a 2-channel I2C switch.

Quoted 8 lines

---

Changes v1 -> v2:
- rebase on current tree

---
  drivers/i2c/muxes/Kconfig   | 3 ++-
  drivers/i2c/muxes/pca954x.c | 6 ++++++
  2 files changed, 8 insertions(+), 1 deletion(-)

Applied to u-boot-i2c.git master

Thanks!

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#9 lore raw

PATCH v2 1/3 i2c: muxes: pca954x: update list of supported devices

In reply to Luca Ceresoli
Quoted 25 lines · Luca Ceresoli

The Kconfig help has not been updated while adding PCA9547 and PCA9646.

---

Changes v1 -> v2:
- add missing comma (Michal)
- reword and rewrap the sentence

---
 drivers/i2c/muxes/Kconfig | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/i2c/muxes/Kconfig +0 -3
index b0da67ce2c6b..4a601c88b78f 100644
@@ -29,11 +29,11 @@ config I2C_MUX_PCA954x
 	tristate "TI PCA954x I2C Mux/switches"
 	depends on I2C_MUX
 	help
-	  If you say yes here you get support for the TI PCA954x
-	  I2C mux/switch devices. It is x width I2C multiplexer which enables to
-	  partitioning I2C bus and connect multiple devices with the same address

drivers/i2c/muxes/Kconfig config I2C_MUX_PCA954x · line 39

Quoted 10 lines
drivers/i2c/muxes/Kconfig +5 -2
-	  to the same I2C controller where driver handles proper routing to
-	  target i2c device. PCA9544 and PCA9548 are supported.
+	  If you say yes here you get support for the TI PCA954x I2C mux/switch
+	  devices. It is x width I2C multiplexer which enables to partitioning
+	  I2C bus and connect multiple devices with the same address to the same
+	  I2C controller where driver handles proper routing to target i2c
+	  device. Supported chips are PCA9544, PCA9547, PCA9548 and PCA9646.
 
 config I2C_MUX_GPIO
         tristate "GPIO-based I2C multiplexer"

Thanks,
Michal

#10 lore raw

PATCH v2 1/3 i2c: muxes: pca954x: update list of supported devices

In reply to Luca Ceresoli

Hello Luca,

Am 09.04.2019 um 08:57 schrieb Luca Ceresoli:

Quoted 4 lines

The Kconfig help has not been updated while adding PCA9547 and PCA9646.

Quoted 8 lines

---

Changes v1 -> v2:
- add missing comma (Michal)
- reword and rewrap the sentence

---
  drivers/i2c/muxes/Kconfig | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#11 lore raw

PATCH v2 1/3 i2c: muxes: pca954x: update list of supported devices

In reply to Luca Ceresoli

Hello Luca,

Am 09.04.2019 um 08:57 schrieb Luca Ceresoli:

Quoted 4 lines

The Kconfig help has not been updated while adding PCA9547 and PCA9646.

Quoted 8 lines

---

Changes v1 -> v2:
- add missing comma (Michal)
- reword and rewrap the sentence

---
  drivers/i2c/muxes/Kconfig | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)

Applied to u-boot-i2c.git master

Thanks!

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de