Switch EEPROM aliases to ZII boards
Subsystems (2)
cover Switch EEPROM aliases to ZII boards
Everyone:
With Marvell driver patches in 'next' a number of ZII boards now expose a switch EEPROM device in devfs. By default those NVMEM devices are given rather unwieldy long names, so this series introduces appropriate aliases to shorten those to either "switch-eeprom" or "switchN-eeprom" for cases of just one or multiple EEPROMs correspondingly.
Feedback is wellcome!
Thanks,
Andrey Smirnov
Andrey Smirnov (6):
ARM: rdu2: Add switch EEPROM alias
ARM: rdu1: Add switch EEPROM alias
ARM: vf610-zii-dev-rev-c: Add switch EEPROM alias
ARM: vf610-zii-cfu1: Add switch EEPROM alias
ARM: vf610-zii-ssmb-spu3: Add switch EEPROM alias
ARM: imx7d-zii-rpu2: Add switch EEPROM alias
arch/arm/dts/imx51-zii-rdu1.dts | 13 +++++++++++++ arch/arm/dts/imx6qdl-zii-rdu2.dtsi | 6 ++++++ arch/arm/dts/imx7d-zii-rpu2.dts | 9 +++++++++ arch/arm/dts/vf610-zii-cfu1.dts | 11 +++++++++++ arch/arm/dts/vf610-zii-dev-rev-c.dts | 12 ++++++++++++ arch/arm/dts/vf610-zii-ssmb-spu3.dts | 11 +++++++++++ 6 files changed, 62 insertions(+)
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/6 ARM: rdu2: Add switch EEPROM alias
--- arch/arm/dts/imx6qdl-zii-rdu2.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/dts/imx6qdl-zii-rdu2.dtsi +6 -0
@@ -52,6 +52,12 @@ aliases { ethernet0 = &fec; ethernet1 = &i210; + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch; }; };
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/6 ARM: rdu1: Add switch EEPROM alias
In reply to Andrey Smirnov--- arch/arm/dts/imx51-zii-rdu1.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm/dts/imx51-zii-rdu1.dts +13 -0
@@ -24,6 +24,15 @@ device-path = &spinor, "partname:barebox-environment"; }; }; + + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch; + }; }; &ecspi1 {
@@ -51,6 +60,10 @@ }; }; +&mdio_gpio { + switch: switch@0 {}; +}; + &uart3 { rave-sp { watchdog {
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/1 miitool: Fix inconsistent spacing
In reply to Andrey SmirnovMake sure that there's a space between device name and it's status string regardless if if device is using "id" field or not.
Before:
barebox@ZII RDU2 Board:/ miitool
mdio0-phy00: mdio:no link
mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok
mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok
After:
barebox@ZII RDU2 Board:/ miitool
mdio0-phy00: mdio: no link
mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio3-phy01: eth1: no link
--- commands/miitool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
commands/miitool.c +1 -1
@@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,for (i =0 ; i <32 ; i++) mii_val[i] = mii->read (mii, phydev->addr, i); -printf ((mii->parent->id) <0 ?"%s: %s:" :"%s: %s%d: " , +printf ((mii->parent->id) <0 ?"%s: %s: " :"%s: %s%d: " , phydev->cdev.name, mii->parent->name, mii->parent->id);
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/6 ARM: vf610-zii-dev-rev-c: Add switch EEPROM alias
In reply to Andrey Smirnov--- arch/arm/dts/vf610-zii-dev-rev-c.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/dts/vf610-zii-dev-rev-c.dts +12 -0
@@ -46,6 +46,18 @@ #include "vf610-zii-dev.dtsi" +/ { + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch0-eeprom = &switch0; + switch1-eeprom = &switch1; + }; +}; + &dspi0 { m25p128@0 { partition@0 {
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 6/6 ARM: imx7d-zii-rpu2: Add switch EEPROM alias
In reply to Andrey Smirnov--- arch/arm/dts/imx7d-zii-rpu2.dts | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/dts/imx7d-zii-rpu2.dts +9 -0
@@ -19,6 +19,15 @@ stdout-path = &uart2; }; + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch0; + }; + gpio-leds { compatible = "gpio-leds"; pinctrl-0 = <&pinctrl_leds_debug>;
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/6 ARM: vf610-zii-ssmb-spu3: Add switch EEPROM alias
In reply to Andrey Smirnov--- arch/arm/dts/vf610-zii-ssmb-spu3.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/dts/vf610-zii-ssmb-spu3.dts +11 -0
@@ -3,3 +3,14 @@ #include <arm/vf610-zii-ssmb-spu3.dts> #include "vf610-zii-dev.dtsi" + +/ { + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch0; + }; +};
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/6 ARM: vf610-zii-cfu1: Add switch EEPROM alias
In reply to Andrey Smirnov--- arch/arm/dts/vf610-zii-cfu1.dts | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm/dts/vf610-zii-cfu1.dts +11 -0
@@ -8,3 +8,14 @@ #include "vf610-zii-dev.dtsi" +/ { + aliases { + /* + * NVMEM device corresponding to EEPROM attached to + * the switch shared DT node with it, so we use that + * fact to create a desirable naming + */ + switch-eeprom = &switch0; + }; +}; +
Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] miitool: Fix inconsistent spacing
In reply to Andrey SmirnovQuoted 30 lines · Andrey Smirnov
Make sure that there's a space between device name and it's status string regardless if if device is using "id" field or not.
Before:
barebox@ZII RDU2 Board:/ miitool
mdio0-phy00: mdio:no link
mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link
mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok
mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link
mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link okAfter:
barebox@ZII RDU2 Board:/ miitool
mdio0-phy00: mdio: no link
mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link
mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link
mdio3-phy01: eth1: no link
Quoted 1 line
Signed-off-by Andrey Smirnov <[email protected]>
Ugh, didn't mean to send this patch out. Sorry for the noise.
Thanks,
Andrey Smirnov
Quoted 18 lines
--- commands/miitool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)commands/miitool.c +1
-2@@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,for (i =0 ; i <32 ; i++) mii_val[i] = mii->read (mii, phydev->addr, i); -printf ((mii->parent->id) <0 ?"%s: %s:" :"%s: %s%d: " , +printf ((mii->parent->id) <0 ?"%s: %s: " :"%s: %s%d: " , phydev->cdev.name, mii->parent->name, mii->parent->id); --
Quoted 2 lines
2.17.1
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 9 lines · Andrey Smirnov
Everyone:
With Marvell driver patches in 'next' a number of ZII boards now expose a switch EEPROM device in devfs. By default those NVMEM devices are given rather unwieldy long names, so this series introduces appropriate aliases to shorten those to either "switch-eeprom" or "switchN-eeprom" for cases of just one or multiple EEPROMs correspondingly.
Quoted 4 lines
Feedback is wellcome!
Thanks,
Andrey Smirnov
Applied, thanks
Sascha
Quoted 26 lines
Andrey Smirnov (6):
ARM: rdu2: Add switch EEPROM alias
ARM: rdu1: Add switch EEPROM alias
ARM: vf610-zii-dev-rev-c: Add switch EEPROM alias
ARM: vf610-zii-cfu1: Add switch EEPROM alias
ARM: vf610-zii-ssmb-spu3: Add switch EEPROM alias
ARM: imx7d-zii-rpu2: Add switch EEPROM aliasarch/arm/dts/imx51-zii-rdu1.dts | 13 +++++++++++++ arch/arm/dts/imx6qdl-zii-rdu2.dtsi | 6 ++++++ arch/arm/dts/imx7d-zii-rpu2.dts | 9 +++++++++ arch/arm/dts/vf610-zii-cfu1.dts | 11 +++++++++++ arch/arm/dts/vf610-zii-dev-rev-c.dts | 12 ++++++++++++ arch/arm/dts/vf610-zii-ssmb-spu3.dts | 11 +++++++++++ 6 files changed, 62 insertions(+)Signature · 7 lines
2.17.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox