dt-bindings: net: dsa: Convert lan9303.txt to yaml format
Subsystems (5)
Frank Li
maintainerPATCH 1/1 dt-bindings: net: dsa: Convert lan9303.txt to yaml format
Convert lan9303.txt to yaml format to fix below CHECK_DTBS warnings:arch/arm/boot/dts/nxp/imx/imx53-kp-hsc.dtb: /soc/bus@50000000/i2c@53fec000/switch@a: failed to match any schema with compatible: ['smsc,lan9303-i2c']
Addtional changes:
- rename switch-phy to switch in example.
--- .../devicetree/bindings/net/dsa/lan9303.txt | 100 -------------- .../bindings/net/dsa/smsc,lan9303.yaml | 123 ++++++++++++++++++ 2 files changed, 123 insertions(+), 100 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/dsa/lan9303.txt create mode 100644 Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml
Documentation/devicetree/bindings/net/dsa/lan9303.txt deleted +0 -100
@@ -1,100 +0,0 @@ -SMSC/MicroChip LAN9303 three port ethernet switch -------------------------------------------------- - -Required properties: - -- compatible: should be - - "smsc,lan9303-i2c" for I2C managed mode - or - - "smsc,lan9303-mdio" for mdio managed mode - -Optional properties: - -- reset-gpios: GPIO to be used to reset the whole device -- reset-duration: reset duration in milliseconds, defaults to 200 ms - -Subnodes: - -The integrated switch subnode should be specified according to the binding -described in dsa/dsa.txt. The CPU port of this switch is always port 0. - -Note: always use 'reg = <0/1/2>;' for the three DSA ports, even if the device is -configured to use 1/2/3 instead. This hardware configuration will be -auto-detected and mapped accordingly. - -Example: - -I2C managed mode: - - master: masterdevice@X { - - fixed-link { /* RMII fixed link to LAN9303 */ - speed = <100>; - full-duplex; - }; - }; - - switch: switch@a { - compatible = "smsc,lan9303-i2c"; - reg = <0xa>; - reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; - reset-duration = <200>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { /* RMII fixed link to master */ - reg = <0>; - ethernet = <&master>; - }; - - port@1 { /* external port 1 */ - reg = <1>; - label = "lan1"; - }; - - port@2 { /* external port 2 */ - reg = <2>; - label = "lan2"; - }; - }; - }; - -MDIO managed mode: - - master: masterdevice@X { - phy-handle = <&switch>; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - - switch: switch-phy@0 { - compatible = "smsc,lan9303-mdio"; - reg = <0>; - reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; - reset-duration = <100>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - ethernet = <&master>; - }; - - port@1 { /* external port 1 */ - reg = <1>; - label = "lan1"; - }; - - port@2 { /* external port 2 */ - reg = <2>; - label = "lan2"; - }; - }; - }; - }; - };
Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml new file +123 -0
123 lines not on this page · raw message
Signature · 1 line
2.43.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Unresolved phandles in YAML examples will cause `dt_binding_check` to fail. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Unresolved phandles in YAML examples will cause dt_binding_check to fail. --
commit ff1d6b54c66febb1ac2492f6699ba1d476db3541
Author: Frank Li <[email protected]>
dt-bindings: net: dsa: Convert lan9303.txt to yaml format
This commit converts the SMSC/MicroChip LAN9303 device tree binding from text to YAML format. It also renames switch-phy to switch in the example to resolve warnings during device tree checks.
Quoted 5 lines
Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml new file +0
-0
[ ... ]
Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml line 62
Quoted 13 lines
Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml new file +13
-0+examples: + - | + #include <dt-bindings/gpio/gpio.h> + + /* I2C managed mode */ + i2c { + #address-cells = <1>; + #size-cells = <0>; + + switch@a { + compatible = "smsc,lan9303-i2c"; + reg = <0xa>; + reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
Will this example fail dt_binding_check? The &gpio7 phandle is referenced here, but there does not appear to be a corresponding gpio7 label defined within the scope of the example.
Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml line 72
Quoted 10 lines
Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml new file +10
-0+ reset-duration = <200>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "cpu"; + ethernet = <&master>;
Similarly, the &master phandle is used here but is not defined. When the example is compiled into a standalone DTS file during dt_binding_check, does this result in a reference to non-existent node or label error from dtc?
Defining dummy nodes for these labels within the examples might be necessary to allow the schema to pass validation.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Frank,
kernel test robot noticed the following build warnings:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v7.1-rc3 next-20260508] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Frank-Li/dt-bindings-net-dsa-Convert-lan9303-txt-to-yaml-format/20260514-202017 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next patch link: https://lore.kernel.org/r/20260512214704.1084890-1-Frank.Li%40nxp.com patch subject: [PATCH 1/1] dt-bindings: net: dsa: Convert lan9303.txt to yaml format compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) docutils: docutils (Docutils 0.21.2, Python 3.13.5, on linux) reproduce: (https://download.01.org/0day-ci/archive/20260514/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
Warning: Documentation/devicetree/bindings/regulator/motorola,cpcap-regulator.yaml references a file that doesn't exist: Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
Warning: Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml references a file that doesn't exist: Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
Warning: Documentation/devicetree/bindings/rtc/motorola,cpcap-rtc.yaml references a file that doesn't exist: Documentation/devicetree/bindings/mfd/motorola,cpcap.yaml
Warning: Documentation/doc-guide/parse-headers.rst references a file that doesn't exist: Documentation/userspace-api/media/Makefile
Warning: Documentation/leds/leds-lp5812.rst references a file that doesn't exist: Documentation/ABI/testing/sysfs-class-led-multicolor.rst
>> Warning: Documentation/networking/dsa/lan9303.rst references a file that doesn't exist: Documentation/devicetree/bindings/net/dsa/lan9303.txt
Warning: Documentation/translations/it_IT/doc-guide/parse-headers.rst references a file that doesn't exist: Documentation/userspace-api/media/Makefile
Warning: Documentation/translations/ja_JP/SubmittingPatches references a file that doesn't exist: linux-2.6.12-vanilla/Documentation/dontdiff
Warning: Documentation/translations/ja_JP/process/submit-checklist.rst references a file that doesn't exist: Documentation/translations/ja_JP/SubmitChecklist
Warning: Documentation/translations/zh_CN/doc-guide/parse-headers.rst references a file that doesn't exist: Documentation/userspace-api/media/Makefile
Warning: Documentation/translations/zh_CN/filesystems/gfs2-glocks.rst references a file that doesn't exist: Documentation/filesystems/gfs2-glocks.rst
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Quoted 4 lines · Frank Li
Convert lan9303.txt to yaml format to fix below
CHECK_DTBSwarnings:arch/arm/boot/dts/nxp/imx/imx53-kp-hsc.dtb: /soc/bus@50000000/i2c@53fec000/switch@a: failed to match any schema with compatible: ['smsc,lan9303-i2c']Addtional changes:
typo
Quoted 9 lines
- rename switch-phy to switch in example.
Signed-off-by Frank Li <[email protected]>--- .../devicetree/bindings/net/dsa/lan9303.txt | 100 -------------- .../bindings/net/dsa/smsc,lan9303.yaml | 123 ++++++++++++++++++ 2 files changed, 123 insertions(+), 100 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/dsa/lan9303.txt create mode 100644 Documentation/devicetree/bindings/net/dsa/smsc,lan9303.yaml
With that and the doc reference fixed,