Commit bad4d335 authored by Stefan Wahren's avatar Stefan Wahren Committed by Shawn Guo
Browse files

ARM: dts: imx28-duckbill: Convert to use label references



These I2SE board files still use node name and unit address
to reference parts from the imx28.dtsi . This causes a lot of
redundancy. So use label references in order to make it easier
to maintain.

Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Cc: Michael Heimpold <mhei@heimpold.de>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 0b80d1ab
Loading
Loading
Loading
Loading
+124 −132
Original line number Diff line number Diff line
@@ -18,30 +18,82 @@ memory@40000000 {
		reg = <0x40000000 0x08000000>;
	};

	apb@80000000 {
		apbh@80000000 {
			ssp0: spi@80010000 {
				compatible = "fsl,imx28-mmc";
	reg_3p3v: regulator-3p3v {
		compatible = "regulator-fixed";
		regulator-name = "3P3V";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
				pinctrl-0 = <&mmc0_8bit_pins_a
					&mmc0_cd_cfg &mmc0_sck_cfg>;
				bus-width = <8>;
				vmmc-supply = <&reg_3p3v>;
		pinctrl-0 = <&led_pins>;

		status-red {
			label = "duckbill:red:status";
			gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		status-green {
			label = "duckbill:green:status";
			gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
		};
	};
};

&auart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&auart0_2pins_a>;
	status = "okay";
				non-removable;
};

			ssp2: spi@80014000 {
				compatible = "fsl,imx28-mmc";
&duart {
	pinctrl-names = "default";
				pinctrl-0 = <&mmc2_4bit_pins_b
					&mmc2_cd_cfg &mmc2_sck_cfg_b>;
				bus-width = <4>;
				vmmc-supply = <&reg_3p3v>;
	pinctrl-0 = <&duart_pins_a>;
	status = "okay";
};

			pinctrl@80018000 {
&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins_a>;
	status = "okay";
};

&lradc {
	status = "okay";
};

&mac0 {
	phy-mode = "rmii";
	pinctrl-names = "default";
	pinctrl-0 = <&mac0_pins_a>, <&mac0_phy_reset_pin>;
	phy-supply = <&reg_3p3v>;
	phy-reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
	phy-reset-duration = <25>;
	phy-handle = <&ethphy>;
	status = "okay";

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		ethphy: ethernet-phy@0 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <0>;
			pinctrl-names = "default";
			pinctrl-0 = <&mac0_phy_int_pin>;
			interrupt-parent = <&gpio0>;
			interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
			max-speed = <100>;
		};
	};
};

&pinctrl {
	pinctrl-names = "default";
	pinctrl-0 = <&hog_pins_a>;

@@ -86,93 +138,33 @@ MX28_PAD_SAIF0_LRCLK__GPIO_3_21
		fsl,pull-up = <MXS_PULL_DISABLE>;
	};
};
		};

		apbx@80040000 {
			lradc@80050000 {
				status = "okay";
			};

			i2c0: i2c@80058000 {
				pinctrl-names = "default";
				pinctrl-0 = <&i2c0_pins_a>;
				status = "okay";
			};

			auart0: serial@8006a000 {
&ssp0 {
	compatible = "fsl,imx28-mmc";
	pinctrl-names = "default";
				pinctrl-0 = <&auart0_2pins_a>;
	pinctrl-0 = <&mmc0_8bit_pins_a
		&mmc0_cd_cfg &mmc0_sck_cfg>;
	bus-width = <8>;
	vmmc-supply = <&reg_3p3v>;
	status = "okay";
	non-removable;
};

			duart: serial@80074000 {
&ssp2 {
	compatible = "fsl,imx28-mmc";
	pinctrl-names = "default";
				pinctrl-0 = <&duart_pins_a>;
				status = "okay";
			};

			usbphy0: usbphy@8007c000 {
	pinctrl-0 = <&mmc2_4bit_pins_b
		&mmc2_cd_cfg &mmc2_sck_cfg_b>;
	bus-width = <4>;
	vmmc-supply = <&reg_3p3v>;
	status = "okay";
};
		};
	};

	ahb@80080000 {
		usb0: usb@80080000 {
&usb0 {
	status = "okay";
	dr_mode = "peripheral";
};

		mac0: ethernet@800f0000 {
			phy-mode = "rmii";
			pinctrl-names = "default";
			pinctrl-0 = <&mac0_pins_a>, <&mac0_phy_reset_pin>;
			phy-supply = <&reg_3p3v>;
			phy-reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
			phy-reset-duration = <25>;
			phy-handle = <&ethphy>;
&usbphy0 {
	status = "okay";

			mdio {
				#address-cells = <1>;
				#size-cells = <0>;

				ethphy: ethernet-phy@0 {
					compatible = "ethernet-phy-ieee802.3-c22";
					reg = <0>;
					pinctrl-names = "default";
					pinctrl-0 = <&mac0_phy_int_pin>;
					interrupt-parent = <&gpio0>;
					interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
					max-speed = <100>;
				};
			};
		};
	};

	reg_3p3v: regulator-3p3v {
		compatible = "regulator-fixed";
		regulator-name = "3P3V";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&led_pins>;

		status-red {
			label = "duckbill:red:status";
			gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		status-green {
			label = "duckbill:green:status";
			gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
		};
	};
};
+94 −102
Original line number Diff line number Diff line
@@ -17,26 +17,66 @@ memory@40000000 {
		reg = <0x40000000 0x08000000>;
	};

	apb@80000000 {
		apbh@80000000 {
			ssp0: spi@80010000 {
				compatible = "fsl,imx28-mmc";
	reg_3p3v: regulator-3p3v {
		compatible = "regulator-fixed";
		regulator-name = "3P3V";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
				pinctrl-0 = <&mmc0_4bit_pins_a
					&mmc0_cd_cfg &mmc0_sck_cfg>;
				bus-width = <4>;
				vmmc-supply = <&reg_3p3v>;
		pinctrl-0 = <&led_pins>;

		status-red {
			label = "duckbill:red:status";
			gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		status-green {
			label = "duckbill:green:status";
			gpios = <&gpio3 5 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
		};
	};
};

&auart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&auart0_2pins_a>;
	status = "okay";
};

			ssp2: spi@80014000 {
				compatible = "fsl,imx28-spi";
&duart {
	pinctrl-names = "default";
				pinctrl-0 = <&spi2_pins_a>;
	pinctrl-0 = <&duart_pins_a>;
	status = "okay";
};

&lradc {
	status = "okay";
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins_a>;
	status = "okay";
};

&mac0 {
	phy-mode = "rmii";
	pinctrl-names = "default";
	pinctrl-0 = <&mac0_pins_a>, <&mac0_phy_reset_pin>;
	phy-supply = <&reg_3p3v>;
	phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
	phy-reset-duration = <25>;
	status = "okay";
};

			pinctrl@80018000 {
&pinctrl {
	pinctrl-names = "default";
	pinctrl-0 = <&hog_pins_a>;

@@ -71,77 +111,29 @@ MX28_PAD_AUART1_TX__GPIO_3_5
		fsl,pull-up = <MXS_PULL_DISABLE>;
	};
};
		};

		apbx@80040000 {
			lradc@80050000 {
				status = "okay";
			};

			i2c0: i2c@80058000 {
				pinctrl-names = "default";
				pinctrl-0 = <&i2c0_pins_a>;
				status = "okay";
			};

			auart0: serial@8006a000 {
&ssp0 {
	compatible = "fsl,imx28-mmc";
	pinctrl-names = "default";
				pinctrl-0 = <&auart0_2pins_a>;
	pinctrl-0 = <&mmc0_4bit_pins_a
		&mmc0_cd_cfg &mmc0_sck_cfg>;
	bus-width = <4>;
	vmmc-supply = <&reg_3p3v>;
	status = "okay";
};

			duart: serial@80074000 {
&ssp2 {
	compatible = "fsl,imx28-spi";
	pinctrl-names = "default";
				pinctrl-0 = <&duart_pins_a>;
	pinctrl-0 = <&spi2_pins_a>;
	status = "okay";
};

			usbphy0: usbphy@8007c000 {
				status = "okay";
			};
		};
	};

	ahb@80080000 {
		usb0: usb@80080000 {
			status = "okay";
&usb0 {
	dr_mode = "peripheral";
		};

		mac0: ethernet@800f0000 {
			phy-mode = "rmii";
			pinctrl-names = "default";
			pinctrl-0 = <&mac0_pins_a>, <&mac0_phy_reset_pin>;
			phy-supply = <&reg_3p3v>;
			phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
			phy-reset-duration = <25>;
	status = "okay";
};
	};

	reg_3p3v: regulator-3p3v {
		compatible = "regulator-fixed";
		regulator-name = "3P3V";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&led_pins>;

		status-red {
			label = "duckbill:red:status";
			gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "default-on";
		};

		status-green {
			label = "duckbill:green:status";
			gpios = <&gpio3 5 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
		};
	};
&usbphy0 {
	status = "okay";
};