* [PATCH v1] i2c: muxes: pca954x: Add MAX735x/MAX736x support
@ 2024-09-19 16:06 bigunclemax
2024-10-21 4:11 ` Heiko Schocher
0 siblings, 1 reply; 3+ messages in thread
From: bigunclemax @ 2024-09-19 16:06 UTC (permalink / raw)
Cc: bigunclemax, Heiko Schocher, Tom Rini, Michal Simek, u-boot
From: Maksim Kiselev <bigunclemax@gmail.com>
Add support for the following Maxim chips using the existing PCA954x
driver:
- MAX7356
- MAX7357
- MAX7358
- MAX7367
- MAX7368
- MAX7369
All added Maxim chips behave like the PCA954x, where a single SMBUS byte
write selects up to 8 channels to be bridged to the primary bus.
Tested using the MAX7358.
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
---
Hi, friends!
I have a custom board with MAX7358 GPIO expander.
This patch is the port of Linux commit:
> 81694437b6eb i2c: muxes: pca954x: Add MAX735x/MAX736x support
Best wishes, Maksim.
drivers/i2c/muxes/Kconfig | 5 +++++
drivers/i2c/muxes/pca954x.c | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index 323c4fbe9c..cd5579aa55 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
@@ -36,6 +36,11 @@ config I2C_MUX_PCA954x
device. Supported chips are PCA9543, PCA9544, PCA9546, PCA9547,
PCA9548 and PCA9646.
+ It's also compatible to Maxims MAX735x I2C switch chips, which are controlled
+ as the NXP PCA9548 and the MAX736x chips that act like the PCA9544.
+ This includes the:
+ MAX7356, MAX7357, MAX7358, MAX7367, MAX7368 and MAX7369
+
config I2C_MUX_GPIO
tristate "GPIO-based I2C multiplexer"
depends on I2C_MUX && DM_GPIO
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index 795288fe2e..9dd2697270 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -14,6 +14,12 @@
#include <asm-generic/gpio.h>
enum pca_type {
+ MAX7356,
+ MAX7357,
+ MAX7358,
+ MAX7367,
+ MAX7368,
+ MAX7369,
PCA9543,
PCA9544,
PCA9546,
@@ -39,6 +45,31 @@ struct pca954x_priv {
};
static const struct chip_desc chips[] = {
+ [MAX7356] = {
+ .muxtype = pca954x_isswi,
+ .width = 8,
+ },
+ [MAX7357] = {
+ .muxtype = pca954x_isswi,
+ .width = 8,
+ },
+ [MAX7358] = {
+ .muxtype = pca954x_isswi,
+ .width = 8,
+ },
+ [MAX7367] = {
+ .muxtype = pca954x_isswi,
+ .width = 4,
+ },
+ [MAX7368] = {
+ .muxtype = pca954x_isswi,
+ .width = 4,
+ },
+ [MAX7369] = {
+ .enable = 0x4,
+ .muxtype = pca954x_ismux,
+ .width = 4,
+ },
[PCA9543] = {
.muxtype = pca954x_isswi,
.width = 2,
@@ -102,6 +133,12 @@ static const struct i2c_mux_ops pca954x_ops = {
};
static const struct udevice_id pca954x_ids[] = {
+ { .compatible = "maxim,max7356", .data = MAX7356 },
+ { .compatible = "maxim,max7357", .data = MAX7357 },
+ { .compatible = "maxim,max7358", .data = MAX7358 },
+ { .compatible = "maxim,max7367", .data = MAX7367 },
+ { .compatible = "maxim,max7368", .data = MAX7368 },
+ { .compatible = "maxim,max7369", .data = MAX7369 },
{ .compatible = "nxp,pca9543", .data = PCA9543 },
{ .compatible = "nxp,pca9544", .data = PCA9544 },
{ .compatible = "nxp,pca9546", .data = PCA9546 },
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] i2c: muxes: pca954x: Add MAX735x/MAX736x support
2024-09-19 16:06 [PATCH v1] i2c: muxes: pca954x: Add MAX735x/MAX736x support bigunclemax
@ 2024-10-21 4:11 ` Heiko Schocher
2024-10-21 8:20 ` Heiko Schocher
0 siblings, 1 reply; 3+ messages in thread
From: Heiko Schocher @ 2024-10-21 4:11 UTC (permalink / raw)
To: bigunclemax; +Cc: Tom Rini, Michal Simek, u-boot
Hello Maksim,
On 19.09.24 18:06, bigunclemax@gmail.com wrote:
> From: Maksim Kiselev <bigunclemax@gmail.com>
>
> Add support for the following Maxim chips using the existing PCA954x
> driver:
> - MAX7356
> - MAX7357
> - MAX7358
> - MAX7367
> - MAX7368
> - MAX7369
>
> All added Maxim chips behave like the PCA954x, where a single SMBUS byte
> write selects up to 8 channels to be bridged to the primary bus.
>
> Tested using the MAX7358.
>
> Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
> ---
> Hi, friends!
>
> I have a custom board with MAX7358 GPIO expander.
> This patch is the port of Linux commit:
> > 81694437b6eb i2c: muxes: pca954x: Add MAX735x/MAX736x support
>
> Best wishes, Maksim.
>
> drivers/i2c/muxes/Kconfig | 5 +++++
> drivers/i2c/muxes/pca954x.c | 37 +++++++++++++++++++++++++++++++++++++
> 2 files changed, 42 insertions(+)
Thanks!
Reviewed-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] i2c: muxes: pca954x: Add MAX735x/MAX736x support
2024-10-21 4:11 ` Heiko Schocher
@ 2024-10-21 8:20 ` Heiko Schocher
0 siblings, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2024-10-21 8:20 UTC (permalink / raw)
To: bigunclemax; +Cc: Tom Rini, Michal Simek, u-boot
Hello Maksim,
On 21.10.24 06:11, Heiko Schocher wrote:
> Hello Maksim,
>
> On 19.09.24 18:06, bigunclemax@gmail.com wrote:
>> From: Maksim Kiselev <bigunclemax@gmail.com>
>>
>> Add support for the following Maxim chips using the existing PCA954x
>> driver:
>> - MAX7356
>> - MAX7357
>> - MAX7358
>> - MAX7367
>> - MAX7368
>> - MAX7369
>>
>> All added Maxim chips behave like the PCA954x, where a single SMBUS byte
>> write selects up to 8 channels to be bridged to the primary bus.
>>
>> Tested using the MAX7358.
>>
>> Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
>> ---
>> Hi, friends!
>>
>> I have a custom board with MAX7358 GPIO expander.
>> This patch is the port of Linux commit:
>> > 81694437b6eb i2c: muxes: pca954x: Add MAX735x/MAX736x support
>>
>> Best wishes, Maksim.
>>
>> drivers/i2c/muxes/Kconfig | 5 +++++
>> drivers/i2c/muxes/pca954x.c | 37 +++++++++++++++++++++++++++++++++++++
>> 2 files changed, 42 insertions(+)
Applied to u-boot-i2c.git
Thanks
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-21 8:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-19 16:06 [PATCH v1] i2c: muxes: pca954x: Add MAX735x/MAX736x support bigunclemax
2024-10-21 4:11 ` Heiko Schocher
2024-10-21 8:20 ` Heiko Schocher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.