sms911x: DTS fixes and DT binding to json-schema conversion
Subsystems (6)
cover sms911x: DTS fixes and DT binding to json-schema conversion
Hi all,
This patch series converts the Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller Device Tree binding documentation to json-schema, after fixing a few issues in DTS files.
Thanks for your comments!
Geert Uytterhoeven (5):
ARM: dts: i.MX51: digi-connectcore-som: Correct Ethernet node name
ARM: dts: imx53-ard: Correct Ethernet node name
ARM: dts: qcom-apq8060: Correct Ethernet node name and drop bogus irq
property
MIPS: SEAD3: Correct Ethernet node name
dt-bindings: net: sms911x: Convert to json-schema
.../devicetree/bindings/net/gpmc-eth.txt | 2 +- .../devicetree/bindings/net/smsc,lan9115.yaml | 107 ++++++++++++++++++ .../devicetree/bindings/net/smsc911x.txt | 43 ------- .../boot/dts/imx51-digi-connectcore-som.dtsi | 2 +- arch/arm/boot/dts/imx53-ard.dts | 2 +- .../arm/boot/dts/qcom-apq8060-dragonboard.dts | 4 +- arch/mips/boot/dts/mti/sead3.dts | 2 +- 7 files changed, 112 insertions(+), 50 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/smsc,lan9115.yaml delete mode 100644 Documentation/devicetree/bindings/net/smsc911x.txt
Signature · 12 lines
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsPATCH 1/5 ARM: dts: i.MX51: digi-connectcore-som: Correct Ethernet node name
make dtbs_check:
lan9221@5,0: $nodename:0: 'lan9221@5,0' does not match '^ethernet(@.*)?$'
--- arch/arm/boot/dts/imx51-digi-connectcore-som.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx51-digi-connectcore-som.dtsi +1 -1
@@ -206,7 +206,7 @@ &weim { pinctrl-0 = <&pinctrl_weim>; status = "okay"; - lan9221: lan9221@5,0 { + lan9221: ethernet@5,0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_lan9221>; compatible = "smsc,lan9221", "smsc,lan9115";
Signature · 1 line
2.25.1
Shawn Guo
AppliedRe: [PATCH 1/5] ARM: dts: i.MX51: digi-connectcore-som: Correct Ethernet node name
Quoted 5 lines · Geert Uytterhoeven
make
dtbs_check:lan9221@5,0: $nodename:0: 'lan9221@5,0' does not match '^ethernet(@.*)?$'Signed-off-by Geert Uytterhoeven <[email protected]>
Applied, thanks.
PATCH 2/5 ARM: dts: imx53-ard: Correct Ethernet node name
In reply to Geert Uytterhoevenmake dtbs_check:
lan9220@f4000000: $nodename:0: 'lan9220@f4000000' does not match '^ethernet(@.*)?$'
--- arch/arm/boot/dts/imx53-ard.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx53-ard.dts +1 -1
@@ -24,7 +24,7 @@ eim-cs1@f4000000 { reg = <0xf4000000 0x3ff0000>; ranges; - lan9220@f4000000 { + ethernet@f4000000 { compatible = "smsc,lan9220", "smsc,lan9115"; reg = <0xf4000000 0x2000000>; phy-mode = "mii";
Signature · 1 line
2.25.1
Shawn Guo
AppliedRe: [PATCH 2/5] ARM: dts: imx53-ard: Correct Ethernet node name
Quoted 5 lines · Geert Uytterhoeven
make
dtbs_check:lan9220@f4000000: $nodename:0: 'lan9220@f4000000' does not match '^ethernet(@.*)?$'Signed-off-by Geert Uytterhoeven <[email protected]>
Applied, thanks.
PATCH 3/5 ARM: dts: qcom-apq8060: Correct Ethernet node name and drop bogus irq property
In reply to Geert Uytterhoevenmake dtbs_check:
ethernet-ebi2@2,0: $nodename:0: 'ethernet-ebi2@2,0' does not match '^ethernet(@.*)?$' ethernet-ebi2@2,0: 'smsc,irq-active-low' does not match any of the regexes: 'pinctrl-[0-9]+'
There is no "smsc,irq-active-low" property, as active low is the default.
--- arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arm/boot/dts/qcom-apq8060-dragonboard.dts +1 -3
@@ -581,7 +581,7 @@ external-bus@1a100000 { * EBI2. This has a 25MHz chrystal next to it, so no * clocking is needed. */ - ethernet-ebi2@2,0 { + ethernet@2,0 { compatible = "smsc,lan9221", "smsc,lan9115"; reg = <2 0x0 0x100>; /*
@@ -598,8 +598,6 @@ ethernet-ebi2@2,0 { phy-mode = "mii"; reg-io-width = <2>; smsc,force-external-phy; - /* IRQ on edge falling = active low */ - smsc,irq-active-low; smsc,irq-push-pull; /*
Signature · 1 line
2.25.1
Re: [PATCH 3/5] ARM: dts: qcom-apq8060: Correct Ethernet node name and drop bogus irq property
Quoted 9 lines · Geert Uytterhoeven
make
dtbs_check:ethernet-ebi2@2,0: $nodename:0: 'ethernet-ebi2@2,0' does not match '^ethernet(@.*)?$' ethernet-ebi2@2,0: 'smsc,irq-active-low' does not match any of the regexes: 'pinctrl-[0-9]+'
There is no "smsc,irq-active-low" property, as active low is the default.
Signed-off-by Geert Uytterhoeven <[email protected]>
I think Bjorn Andersson has to apply this patch.
Yours,
Linus Walleij
PATCH 4/5 MIPS: SEAD3: Correct Ethernet node name
In reply to Geert Uytterhoevenmake dtbs_check:
eth@1f010000: $nodename:0: 'eth@1f010000' does not match '^ethernet(@.*)?$'
--- arch/mips/boot/dts/mti/sead3.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/boot/dts/mti/sead3.dts +1 -1
@@ -244,7 +244,7 @@ uart1: uart@1f000800 { no-loopback-test; }; - eth@1f010000 { + ethernet@1f010000 { compatible = "smsc,lan9115"; reg = <0x1f010000 0x10000>; reg-io-width = <4>;
Signature · 1 line
2.25.1
Re: [PATCH 4/5] MIPS: SEAD3: Correct Ethernet node name
Quoted 8 lines · Geert Uytterhoeven
make
dtbs_check:eth@1f010000: $nodename:0: 'eth@1f010000' does not match '^ethernet(@.*)?$'Signed-off-by Geert Uytterhoeven <[email protected]>--- arch/mips/boot/dts/mti/sead3.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]
Re: [PATCH 4/5] MIPS: SEAD3: Correct Ethernet node name
Hi Thomas,
Quoted 11 lines · Thomas Bogendoerfer
Quoted 8 lines · Geert Uytterhoeven
make
dtbs_check:eth@1f010000: $nodename:0: 'eth@1f010000' does not match '^ethernet(@.*)?$'Signed-off-by Geert Uytterhoeven <[email protected]>--- arch/mips/boot/dts/mti/sead3.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Can you please take this through the MIPS tree?
Thanks!
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Thomas Bogendoerfer
maintainerRe: [PATCH 4/5] MIPS: SEAD3: Correct Ethernet node name
Quoted 9 lines · Geert Uytterhoeven
Hi Thomas,
Quoted 5 lines · Thomas Bogendoerfer
Quoted 4 lines · Geert Uytterhoeven
make
dtbs_check:eth@1f010000: $nodename:0: 'eth@1f010000' does not match '^ethernet(@.*)?$'
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by Geert Uytterhoeven <[email protected]>--- arch/mips/boot/dts/mti/sead3.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Can you please take this through the MIPS tree?
sure, applied now.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]
PATCH 5/5 dt-bindings: net: sms911x: Convert to json-schema
In reply to Geert UytterhoevenConvert the Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller Device Tree binding documentation to json-schema.
Document missing properties.
Make "phy-mode" not required, as many DTS files do not have it, and the Linux drivers falls back to PHY_INTERFACE_MODE_NA.
Correct nodename in example.
---
I have listed Shawn as the maintainer, as he wrote the original bindings. Shawn: Please scream if this is inappropriate ;-)
I left "additionalProperties: true", as there are lots of bus-specific properties ("qcom,*", "samsung,*", "fsl,*", "gpmc,*", ...) to be found, that actually depend on the compatible value of the parent node.
--- .../devicetree/bindings/net/gpmc-eth.txt | 2 +- .../devicetree/bindings/net/smsc,lan9115.yaml | 107 ++++++++++++++++++ .../devicetree/bindings/net/smsc911x.txt | 43 ------- 3 files changed, 108 insertions(+), 44 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/smsc,lan9115.yaml delete mode 100644 Documentation/devicetree/bindings/net/smsc911x.txt
Documentation/devicetree/bindings/net/gpmc-eth.txt +1 -1
@@ -13,7 +13,7 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt For the properties relevant to the ethernet controller connected to the GPMC refer to the binding documentation of the device. For example, the documentation -for the SMSC 911x is Documentation/devicetree/bindings/net/smsc911x.txt +for the SMSC 911x is Documentation/devicetree/bindings/net/smsc,lan9115.yaml Child nodes need to specify the GPMC bus address width using the "bank-width" property but is possible that an ethernet controller also has a property to
Documentation/devicetree/bindings/net/smsc,lan9115.yaml new file +107 -0
107 lines not on this page · raw message
Documentation/devicetree/bindings/net/smsc911x.txt deleted +0 -43
43 lines not on this page · raw message
Signature · 1 line
2.25.1
Rob Herring
maintainerRe: [PATCH 5/5] dt-bindings: net: sms911x: Convert to json-schema
Quoted 8 lines · Geert Uytterhoeven
Convert the Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller Device Tree binding documentation to json-schema.
Document missing properties.
Make "phy-mode" not required, as many DTS files do not have it, and the Linux drivers falls back toPHY_INTERFACE_MODE_NA.
Correct nodename in example.
Quoted 8 lines
Signed-off-by Geert Uytterhoeven <[email protected]>---
I have listed Shawn as the maintainer, as he wrote the original bindings. Shawn: Please scream if this is inappropriate ;-)I left "additionalProperties: true", as there are lots of bus-specific properties ("qcom,*", "samsung,*", "fsl,*", "gpmc,*", ...) to be found, that actually depend on the compatible value of the parent node.
Can you put a comment above additionalProperties to that effect. I need to come up with some solution for this, but don't want folks copying that when normally not needed.
Quoted 43 lines
--- .../devicetree/bindings/net/gpmc-eth.txt | 2 +- .../devicetree/bindings/net/smsc,lan9115.yaml | 107 ++++++++++++++++++ .../devicetree/bindings/net/smsc911x.txt | 43 ------- 3 files changed, 108 insertions(+), 44 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/smsc,lan9115.yaml delete mode 100644 Documentation/devicetree/bindings/net/smsc911x.txtDocumentation/devicetree/bindings/net/gpmc-eth.txt +1
-1@@ -13,7 +13,7 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt For the properties relevant to the ethernet controller connected to the GPMC refer to the binding documentation of the device. For example, the documentation -for the SMSC 911x is Documentation/devicetree/bindings/net/smsc911x.txt +for the SMSC 911x is Documentation/devicetree/bindings/net/smsc,lan9115.yaml Child nodes need to specify the GPMC bus address width using the "bank-width" property but is possible that an ethernet controller also has a property toDocumentation/devicetree/bindings/net/smsc,lan9115.yaml new file +15
-0@@ -0,0 +1,107 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/smsc,lan9115.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller + +maintainers: + - Shawn Guo <[email protected]> + +allOf: + - $ref: ethernet-controller.yaml# + +properties:
Documentation/devicetree/bindings/net/smsc,lan9115.yaml line 25
Quoted 10 lines
Documentation/devicetree/bindings/net/smsc,lan9115.yaml new file +10
-0+ compatible: + oneOf: + - const: smsc,lan9115 + - items: + - enum: + - "smsc,lan89218" + - "smsc,lan9117" + - "smsc,lan9118" + - "smsc,lan9220" + - "smsc,lan9221"
Don't need quotes.
Quoted 134 lines
Documentation/devicetree/bindings/net/smsc,lan9115.yaml new file +82
-0+ - const: smsc,lan9115 + + reg: + maxItems: 1 + + reg-shift: true + + reg-io-width: + enum: [ 2, 4 ] + default: 2 + + interrupts: + minItems: 1 + items: + - description: + LAN interrupt line + - description: + Optional PME (power management event) interrupt that is able to wake + up the host system with a 50ms pulse on network activity + + clocks: + maxItems: 1 + + phy-mode: true + + smsc,irq-active-high: + type: boolean + description: Indicates the IRQ polarity is active-high + + smsc,irq-push-pull: + type: boolean + description: Indicates the IRQ type is push-pull + + smsc,force-internal-phy: + type: boolean + description: Forces SMSC LAN controller to use internal PHY + + smsc,force-external-phy: + type: boolean + description: Forces SMSC LAN controller to use external PHY + + smsc,save-mac-address: + type: boolean + description: + Indicates that MAC address needs to be saved before resetting the + controller + + reset-gpios: + maxItems: 1 + description: + A GPIO line connected to the RESET (active low) signal of the device. + On many systems this is wired high so the device goes out of reset at + power-on, but if it is under program control, this optional GPIO can + wake up in response to it. + + vdd33a-supply: + description: 3.3V analog power supply + + vddvario-supply: + description: IO logic power supply + +required: + - compatible + - reg + - interrupts + +additionalProperties: true + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + ethernet@f4000000 { + compatible = "smsc,lan9220", "smsc,lan9115"; + reg = <0xf4000000 0x2000000>; + phy-mode = "mii"; + interrupt-parent = <&gpio1>; + interrupts = <31>, <32>; + reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; + reg-io-width = <4>; + smsc,irq-push-pull; + };Documentation/devicetree/bindings/net/smsc911x.txt deleted +0
-43@@ -1,43 +0,0 @@ -* Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller - -Required properties: -- compatible : Should be "smsc,lan<model>", "smsc,lan9115" -- reg : Address and length of the io space for SMSC LAN -- interrupts : one or two interrupt specifiers - - The first interrupt is the SMSC LAN interrupt line - - The second interrupt (if present) is the PME (power - management event) interrupt that is able to wake up the host - system with a 50ms pulse on network activity -- phy-mode : See ethernet.txt file in the same directory - -Optional properties: -- reg-shift : Specify the quantity to shift the register offsets by -- reg-io-width : Specify the size (in bytes) of the IO accesses that - should be performed on the device. Valid value for SMSC LAN is - 2 or 4. If it's omitted or invalid, the size would be 2. -- smsc,irq-active-high : Indicates the IRQ polarity is active-high -- smsc,irq-push-pull : Indicates the IRQ type is push-pull -- smsc,force-internal-phy : Forces SMSC LAN controller to use - internal PHY -- smsc,force-external-phy : Forces SMSC LAN controller to use - external PHY -- smsc,save-mac-address : Indicates that mac address needs to be saved - before resetting the controller -- reset-gpios : a GPIO line connected to the RESET (active low) signal - of the device. On many systems this is wired high so the device goes - out of reset at power-on, but if it is under program control, this - optional GPIO can wake up in response to it. -- vdd33a-supply, vddvario-supply : 3.3V analog and IO logic power supplies - -Examples: - -lan9220@f4000000 { - compatible = "smsc,lan9220", "smsc,lan9115"; - reg = <0xf4000000 0x2000000>; - phy-mode = "mii"; - interrupt-parent = <&gpio1>; - interrupts = <31>, <32>; - reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; - reg-io-width = <4>; - smsc,irq-push-pull; -};Signature · 1 line
2.25.1