[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOK2joEztceZ+XyWn0_mywODW9Q-=zzbuBSbZj=fwUwTvmzvOQ@mail.gmail.com>
Date: Fri, 13 Mar 2020 17:04:45 -0400
From: Sriram Chadalavada <sriram.chadalavada@...dleap.ca>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org
Subject: Re: Information on DSA driver initialization
Hi Andrew,
Thank you for the clarification. I'm trying with new binding but am
facing difficulty with appropriate device tree creation.
Please find attached a block diagram of the DSA Marvell 6176 switch
I am working with.
This entry in the device tree is what worked with CONFIG_NET_DSA_LEGACY.
dsa@0 {
compatible = "marvell,dsa";
#address-cells = <2>;
#size-cells = <0>;
interrupt-parent = <&gpio2>;
interrupts = <&gpio2 31 IRQ_TYPE_LEVEL_LOW>;
dsa,ethernet = <ð0>;
switch@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0 0>;
port@0 {
reg = <0>;
label = "eth1";
};
port@1 {
reg = <1>;
label = "eth2";
};
port@2 {
reg = <2>;
label = "eth3";
};
port@3 {
reg = <3>;
label = "eth4";
};
port@4 {
reg = <4>;
label = "eth5";
};
port@5 {
reg = <5>;
label = "cpu";
};
};
};
and this attempt with the new binding (using imx6qdl-zii-rdu2.dtsi as
an example) :
/* Marvell 6176 switch under new DSA binding */
fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii-id";
phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&gpio2>;
interrupts = <&gpio2 31 IRQ_TYPE_LEVEL_LOW>;
switch: switch@0 {
compatible = "marvell,mv88e6085";
reg = <0>;
dsa,member = <0 0>;
ports{
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "port0";
};
port@1 {
reg = <1>;
label = "port1";
};
port@2 {
reg = <2>;
label = "port2";
};
port@5 {
reg = <5>;
label = "cpu";
ethernet = <&fec>; /*Similar
to how CPU port is defined in imx6dl-zii-rd2.dtsi */
};
};
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
};
};
};
causes kernel PANIC after SEVERAL warnings during the build process:
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/linux-4.19.106/scripts/dtc/dtc
-O dtb -i/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/linux-4.19.106/arch/arm/boot/dts/
-Wno-unit_address_vs_reg -Wno-simple_bus_reg -Wno-unit_address_format
-Wno-pci_bridge -Wno-pci_device_bus_num -Wno-pci_device_reg
-Wno-avoid_unnecessary_addr_size -Wno-alias_paths
-Wno-graph_child_address -Wno-graph_port -Wno-unique_unit_address -o
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb.tmp
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (reg_format): /ecspi2/hi3593@0:reg: property has invalid
length (4 bytes) (#address-cells == 2, #size-cells == 1)
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (reg_format): /i2c1/pca9538@70:reg: property has invalid
length (4 bytes) (#address-cells == 2, #size-cells == 1)
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (reg_format): /i2c1/gpio@71:reg: property has invalid length
(4 bytes) (#address-cells == 2, #size-cells == 1)
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (reg_format): /i2c1/gpio@72:reg: property has invalid length
(4 bytes) (#address-cells == 2, #size-cells == 1)
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (reg_format): /i2c1/pca9538@73:reg: property has invalid
length (4 bytes) (#address-cells == 2, #size-cells == 1)
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (reg_format): /i2c1/lm75@48:reg: property has invalid length
(4 bytes) (#address-cells == 2, #size-cells == 1)
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (reg_format): /i2c1/eeprom@54:reg: property has invalid length
(4 bytes) (#address-cells == 2, #size-cells == 1)
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (reg_format): /i2c1/rtc@51:reg: property has invalid length (4
bytes) (#address-cells == 2, #size-cells == 1)
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /ecspi2/hi3593@0: Relying on
default #address-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /ecspi2/hi3593@0: Relying on
default #size-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/pca9538@70: Relying on
default #address-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/pca9538@70: Relying on
default #size-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/gpio@71: Relying on default
#address-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/gpio@71: Relying on default
#size-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/gpio@72: Relying on default
#address-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/gpio@72: Relying on default
#size-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/pca9538@73: Relying on
default #address-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/pca9538@73: Relying on
default #size-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/lm75@48: Relying on default
#address-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/lm75@48: Relying on default
#size-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/eeprom@54: Relying on default
#address-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/eeprom@54: Relying on default
#size-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/rtc@51: Relying on default
#address-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (avoid_default_addr_size): /i2c1/rtc@51: Relying on default
#size-cells value
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb:
Warning (interrupts_property): /fec/mdio:#interrupt-cells: size is
(12), expected multiple of 8
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-smu.dtb:
Warning (interrupts_property): /dsa@0:#interrupt-cells: size is (12),
expected multiple of 8
rm -f /home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/image-imx6q-sd-hub.dtb.tmp
cp -fpR /home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/linux-4.19.106/arch/arm/boot/dts/imx6q-sd-hub.dtb
/home/schadalavada/data/buildcore2/buildcore/bin/targets/imx6/generic-glibc/imx6q-sd-hub.dtb;
/home/schadalavada/data/buildcore2/buildcore/scripts/mkits.sh -D
imx6q-sd-hub -o
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/fit-imx6q-sd-hub.its
-k /home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/zImage
-d /home/schadalavada/data/buildcore2/buildcore/bin/targets/imx6/generic-glibc/imx6q-sd-hub.dtb
-C none -a 0x10008000 -e 0x10008000 -c "config@1" -A arm -v 4.19.106
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/fit-imx6q-sd-hub-initramfs.itb.tmp:
Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name,
but no reg property
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/fit-imx6q-sd-hub-initramfs.itb.tmp:
Warning (unit_address_vs_reg): /images/kernel@...ash@1: node has a
unit name, but no reg property
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/fit-imx6q-sd-hub-initramfs.itb.tmp:
Warning (unit_address_vs_reg): /images/kernel@...ash@2: node has a
unit name, but no reg property
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/fit-imx6q-sd-hub-initramfs.itb.tmp:
Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name,
but no reg property
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/fit-imx6q-sd-hub-initramfs.itb.tmp:
Warning (unit_address_vs_reg): /images/fdt@...ash@1: node has a unit
name, but no reg property
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/fit-imx6q-sd-hub-initramfs.itb.tmp:
Warning (unit_address_vs_reg): /images/fdt@...ash@2: node has a unit
name, but no reg property
/home/schadalavada/data/buildcore2/buildcore/build_dir/target-arm_cortex-a9+neon_glibc_eabi/linux-imx6/fit-imx6q-sd-hub-initramfs.itb.tmp:
Warning (unit_address_vs_reg): /configurations/config@1: node has a
unit name, but no reg property
Where should I be investigating next?
Thank you,
Sriram
On Fri, Mar 13, 2020 at 5:47 AM Andrew Lunn <andrew@...n.ch> wrote:
>
> On Thu, Mar 12, 2020 at 06:38:24PM -0400, Sriram Chadalavada wrote:
> > Hi Andrew,
> > Thank you for your response.
> >
> > Yes. There are patches applied. I did scatter printks/pr_info but
> > don't see anything yet from the Marvell 6176 switch without
> > CONFIG_NET_DSA_LEGACY enabled.
>
> CONFIG_NET_DSA_LEGACY is dead. Don't use it. Use the new binding.
>
> >
> > One question I have is if CONFIG_NET_DSA_LEGACY is NOT selected,
> > what in the 4.19 kernel takes over the function of dsa_probe function
> > in net/dsa/legacy.c and mv88e6xxx_drv_probe in
> > drivers/net/dsa/mv88e6xxx/chip.c ?
>
> When the mdio bus is registered, the mdio driver calls
> of_mdiobus_register() passing a DT node for the bus. The bus is walked
> and devices instantiated.
>
> Andrew
Download attachment "Untitled Diagram.pdf" of type "application/pdf" (21896 bytes)
Powered by blists - more mailing lists