* [PATCH] ARM: dts: NSP: Use hardware I2C for BCM958625HR
@ 2019-12-13 19:51 ` Florian Fainelli
0 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2019-12-13 19:51 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Florian Fainelli, Rob Herring, Mark Rutland, Ray Jui,
Scott Branden, maintainer:BROADCOM IPROC ARM ARCHITECTURE,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Now that the i2c-bcm-iproc driver has been fixed to permit reading more
than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c:
iproc: Fix i2c master read more than 63 bytes") we no longer need to
bitbang i2c over GPIOs which was necessary before to allow the
PHYLINK/SFP subsystems to read SFP modules.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/arm/boot/dts/bcm958625hr.dts | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
index a2c9de35ddfb..536fb24f38bb 100644
--- a/arch/arm/boot/dts/bcm958625hr.dts
+++ b/arch/arm/boot/dts/bcm958625hr.dts
@@ -55,18 +55,9 @@
priority = <200>;
};
- /* Hardware I2C block cannot do more than 63 bytes per transfer,
- * which would prevent reading from a SFP's EEPROM (256 byte).
- */
- i2c1: i2c {
- compatible = "i2c-gpio";
- sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
- scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
- };
-
sfp: sfp {
compatible = "sff,sfp";
- i2c-bus = <&i2c1>;
+ i2c-bus = <&i2c0>;
mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
@@ -74,6 +65,10 @@
};
};
+&i2c0 {
+ status = "okay";
+};
+
&amac0 {
status = "okay";
};
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] ARM: dts: NSP: Use hardware I2C for BCM958625HR
@ 2019-12-13 19:51 ` Florian Fainelli
0 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2019-12-13 19:51 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Mark Rutland,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Florian Fainelli, Scott Branden, Ray Jui, open list, Rob Herring,
maintainer:BROADCOM IPROC ARM ARCHITECTURE
Now that the i2c-bcm-iproc driver has been fixed to permit reading more
than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c:
iproc: Fix i2c master read more than 63 bytes") we no longer need to
bitbang i2c over GPIOs which was necessary before to allow the
PHYLINK/SFP subsystems to read SFP modules.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/arm/boot/dts/bcm958625hr.dts | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
index a2c9de35ddfb..536fb24f38bb 100644
--- a/arch/arm/boot/dts/bcm958625hr.dts
+++ b/arch/arm/boot/dts/bcm958625hr.dts
@@ -55,18 +55,9 @@
priority = <200>;
};
- /* Hardware I2C block cannot do more than 63 bytes per transfer,
- * which would prevent reading from a SFP's EEPROM (256 byte).
- */
- i2c1: i2c {
- compatible = "i2c-gpio";
- sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
- scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
- };
-
sfp: sfp {
compatible = "sff,sfp";
- i2c-bus = <&i2c1>;
+ i2c-bus = <&i2c0>;
mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
@@ -74,6 +65,10 @@
};
};
+&i2c0 {
+ status = "okay";
+};
+
&amac0 {
status = "okay";
};
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: dts: NSP: Use hardware I2C for BCM958625HR
2019-12-13 19:51 ` Florian Fainelli
@ 2019-12-13 22:11 ` Ray Jui
-1 siblings, 0 replies; 8+ messages in thread
From: Ray Jui @ 2019-12-13 22:11 UTC (permalink / raw)
To: Florian Fainelli, linux-arm-kernel
Cc: Rob Herring, Mark Rutland, Ray Jui, Scott Branden,
maintainer:BROADCOM IPROC ARM ARCHITECTURE,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
On 2019-12-13 11:51 a.m., Florian Fainelli wrote:
> Now that the i2c-bcm-iproc driver has been fixed to permit reading more
> than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c:
> iproc: Fix i2c master read more than 63 bytes") we no longer need to
> bitbang i2c over GPIOs which was necessary before to allow the
> PHYLINK/SFP subsystems to read SFP modules.
>
This is good to hear!
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> arch/arm/boot/dts/bcm958625hr.dts | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
> index a2c9de35ddfb..536fb24f38bb 100644
> --- a/arch/arm/boot/dts/bcm958625hr.dts
> +++ b/arch/arm/boot/dts/bcm958625hr.dts
> @@ -55,18 +55,9 @@
> priority = <200>;
> };
>
> - /* Hardware I2C block cannot do more than 63 bytes per transfer,
> - * which would prevent reading from a SFP's EEPROM (256 byte).
> - */
> - i2c1: i2c {
> - compatible = "i2c-gpio";
> - sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> - scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> - };
> -
So I suppose GPIO 4 and 5 from the 'gpioa' controller are tied to the
same SCL/SDA pins from i2c0 and they are internally muxed, right?
Is the mux to GPIO done automatically when pins are configured as GPIO,
and therefore you don't require any additional changes to pinmux to make
this work, after changing it back to use real I2C0 block below?
> sfp: sfp {
> compatible = "sff,sfp";
> - i2c-bus = <&i2c1>;
> + i2c-bus = <&i2c0>;
> mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
> los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
> tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
> @@ -74,6 +65,10 @@
> };
> };
>
> +&i2c0 {
> + status = "okay";
> +};
> +
> &amac0 {
> status = "okay";
> };
>
Change looks good to me.
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Thanks,
Ray
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: dts: NSP: Use hardware I2C for BCM958625HR
@ 2019-12-13 22:11 ` Ray Jui
0 siblings, 0 replies; 8+ messages in thread
From: Ray Jui @ 2019-12-13 22:11 UTC (permalink / raw)
To: Florian Fainelli, linux-arm-kernel
Cc: Mark Rutland,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Scott Branden, Ray Jui, open list, Rob Herring,
maintainer:BROADCOM IPROC ARM ARCHITECTURE
On 2019-12-13 11:51 a.m., Florian Fainelli wrote:
> Now that the i2c-bcm-iproc driver has been fixed to permit reading more
> than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c:
> iproc: Fix i2c master read more than 63 bytes") we no longer need to
> bitbang i2c over GPIOs which was necessary before to allow the
> PHYLINK/SFP subsystems to read SFP modules.
>
This is good to hear!
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> arch/arm/boot/dts/bcm958625hr.dts | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
> index a2c9de35ddfb..536fb24f38bb 100644
> --- a/arch/arm/boot/dts/bcm958625hr.dts
> +++ b/arch/arm/boot/dts/bcm958625hr.dts
> @@ -55,18 +55,9 @@
> priority = <200>;
> };
>
> - /* Hardware I2C block cannot do more than 63 bytes per transfer,
> - * which would prevent reading from a SFP's EEPROM (256 byte).
> - */
> - i2c1: i2c {
> - compatible = "i2c-gpio";
> - sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> - scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> - };
> -
So I suppose GPIO 4 and 5 from the 'gpioa' controller are tied to the
same SCL/SDA pins from i2c0 and they are internally muxed, right?
Is the mux to GPIO done automatically when pins are configured as GPIO,
and therefore you don't require any additional changes to pinmux to make
this work, after changing it back to use real I2C0 block below?
> sfp: sfp {
> compatible = "sff,sfp";
> - i2c-bus = <&i2c1>;
> + i2c-bus = <&i2c0>;
> mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
> los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
> tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
> @@ -74,6 +65,10 @@
> };
> };
>
> +&i2c0 {
> + status = "okay";
> +};
> +
> &amac0 {
> status = "okay";
> };
>
Change looks good to me.
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Thanks,
Ray
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: dts: NSP: Use hardware I2C for BCM958625HR
2019-12-13 22:11 ` Ray Jui
@ 2019-12-13 22:47 ` Florian Fainelli
-1 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2019-12-13 22:47 UTC (permalink / raw)
To: Ray Jui, linux-arm-kernel
Cc: Rob Herring, Mark Rutland, Ray Jui, Scott Branden,
maintainer:BROADCOM IPROC ARM ARCHITECTURE,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
On 12/13/2019 2:11 PM, Ray Jui wrote:
>
>
> On 2019-12-13 11:51 a.m., Florian Fainelli wrote:
>> Now that the i2c-bcm-iproc driver has been fixed to permit reading more
>> than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c:
>> iproc: Fix i2c master read more than 63 bytes") we no longer need to
>> bitbang i2c over GPIOs which was necessary before to allow the
>> PHYLINK/SFP subsystems to read SFP modules.
>>
>
> This is good to hear!
>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>> arch/arm/boot/dts/bcm958625hr.dts | 15 +++++----------
>> 1 file changed, 5 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/bcm958625hr.dts
>> b/arch/arm/boot/dts/bcm958625hr.dts
>> index a2c9de35ddfb..536fb24f38bb 100644
>> --- a/arch/arm/boot/dts/bcm958625hr.dts
>> +++ b/arch/arm/boot/dts/bcm958625hr.dts
>> @@ -55,18 +55,9 @@
>> priority = <200>;
>> };
>> - /* Hardware I2C block cannot do more than 63 bytes per transfer,
>> - * which would prevent reading from a SFP's EEPROM (256 byte).
>> - */
>> - i2c1: i2c {
>> - compatible = "i2c-gpio";
>> - sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> - scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> - };
>> -
>
> So I suppose GPIO 4 and 5 from the 'gpioa' controller are tied to the
> same SCL/SDA pins from i2c0 and they are internally muxed, right?
Correct.
>
> Is the mux to GPIO done automatically when pins are configured as GPIO,
> and therefore you don't require any additional changes to pinmux to make
> this work, after changing it back to use real I2C0 block below?
Yes indeed.
>
>> sfp: sfp {
>> compatible = "sff,sfp";
>> - i2c-bus = <&i2c1>;
>> + i2c-bus = <&i2c0>;
>> mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
>> los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
>> tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
>> @@ -74,6 +65,10 @@
>> };
>> };
>> +&i2c0 {
>> + status = "okay";
>> +};
>> +
>> &amac0 {
>> status = "okay";
>> };
>>
>
> Change looks good to me.
>
> Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Thanks!
--
Florian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: dts: NSP: Use hardware I2C for BCM958625HR
@ 2019-12-13 22:47 ` Florian Fainelli
0 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2019-12-13 22:47 UTC (permalink / raw)
To: Ray Jui, linux-arm-kernel
Cc: Mark Rutland,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Scott Branden, Ray Jui, open list, Rob Herring,
maintainer:BROADCOM IPROC ARM ARCHITECTURE
On 12/13/2019 2:11 PM, Ray Jui wrote:
>
>
> On 2019-12-13 11:51 a.m., Florian Fainelli wrote:
>> Now that the i2c-bcm-iproc driver has been fixed to permit reading more
>> than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c:
>> iproc: Fix i2c master read more than 63 bytes") we no longer need to
>> bitbang i2c over GPIOs which was necessary before to allow the
>> PHYLINK/SFP subsystems to read SFP modules.
>>
>
> This is good to hear!
>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>> arch/arm/boot/dts/bcm958625hr.dts | 15 +++++----------
>> 1 file changed, 5 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/bcm958625hr.dts
>> b/arch/arm/boot/dts/bcm958625hr.dts
>> index a2c9de35ddfb..536fb24f38bb 100644
>> --- a/arch/arm/boot/dts/bcm958625hr.dts
>> +++ b/arch/arm/boot/dts/bcm958625hr.dts
>> @@ -55,18 +55,9 @@
>> priority = <200>;
>> };
>> - /* Hardware I2C block cannot do more than 63 bytes per transfer,
>> - * which would prevent reading from a SFP's EEPROM (256 byte).
>> - */
>> - i2c1: i2c {
>> - compatible = "i2c-gpio";
>> - sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> - scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> - };
>> -
>
> So I suppose GPIO 4 and 5 from the 'gpioa' controller are tied to the
> same SCL/SDA pins from i2c0 and they are internally muxed, right?
Correct.
>
> Is the mux to GPIO done automatically when pins are configured as GPIO,
> and therefore you don't require any additional changes to pinmux to make
> this work, after changing it back to use real I2C0 block below?
Yes indeed.
>
>> sfp: sfp {
>> compatible = "sff,sfp";
>> - i2c-bus = <&i2c1>;
>> + i2c-bus = <&i2c0>;
>> mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
>> los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
>> tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
>> @@ -74,6 +65,10 @@
>> };
>> };
>> +&i2c0 {
>> + status = "okay";
>> +};
>> +
>> &amac0 {
>> status = "okay";
>> };
>>
>
> Change looks good to me.
>
> Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Thanks!
--
Florian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: dts: NSP: Use hardware I2C for BCM958625HR
2019-12-13 19:51 ` Florian Fainelli
@ 2019-12-17 0:15 ` Florian Fainelli
-1 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2019-12-17 0:15 UTC (permalink / raw)
To: bcm-kernel-feedback-list, linux-arm-kernel
Cc: Rob Herring, Mark Rutland, Ray Jui, Scott Branden,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
On Fri, 13 Dec 2019 11:51:02 -0800, Florian Fainelli <f.fainelli@gmail.com> wrote:
> Now that the i2c-bcm-iproc driver has been fixed to permit reading more
> than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c:
> iproc: Fix i2c master read more than 63 bytes") we no longer need to
> bitbang i2c over GPIOs which was necessary before to allow the
> PHYLINK/SFP subsystems to read SFP modules.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
Applied to devicetree/next, thanks!
--
Florian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ARM: dts: NSP: Use hardware I2C for BCM958625HR
@ 2019-12-17 0:15 ` Florian Fainelli
0 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2019-12-17 0:15 UTC (permalink / raw)
To: bcm-kernel-feedback-list, linux-arm-kernel
Cc: Mark Rutland,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Scott Branden, Ray Jui, open list, Rob Herring
On Fri, 13 Dec 2019 11:51:02 -0800, Florian Fainelli <f.fainelli@gmail.com> wrote:
> Now that the i2c-bcm-iproc driver has been fixed to permit reading more
> than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c:
> iproc: Fix i2c master read more than 63 bytes") we no longer need to
> bitbang i2c over GPIOs which was necessary before to allow the
> PHYLINK/SFP subsystems to read SFP modules.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
Applied to devicetree/next, thanks!
--
Florian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-12-17 0:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 19:51 [PATCH] ARM: dts: NSP: Use hardware I2C for BCM958625HR Florian Fainelli
2019-12-13 19:51 ` Florian Fainelli
2019-12-13 22:11 ` Ray Jui
2019-12-13 22:11 ` Ray Jui
2019-12-13 22:47 ` Florian Fainelli
2019-12-13 22:47 ` Florian Fainelli
2019-12-17 0:15 ` Florian Fainelli
2019-12-17 0:15 ` Florian Fainelli
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.