Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444885

Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T
Date 2016-07-16 18:40 +0200
Message-ID <rVANc-665-23@gated-at.bofh.it> (permalink)
References <rVzo5-5n4-3@gated-at.bofh.it> <rVzo6-5n4-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> +	chosen {
> +		bootargs = "console=ttyS0,115200n8 earlyprintk";
> +		linux,stdout-path = &uart0;
> +	};

You can put the board rate etc in the stdout-patch. Something like:

                stdout-path = "serial0:115200n8";

> +	gpio-leds {
> +		compatible = "gpio-leds";
> +		pinctrl-0 = <&pmx_power_led &pmx_power_led_blink &pmx_wan_led>;
> +		pinctrl-names = "default";
> +
> +		led@0 {
> +			label = "power:green";

Documentation/leds/leds-class.txt says:

LED Device Naming
=================

Is currently of the form:

"devicename:colour:function"

> +	dsa@0 {
> +		compatible = "marvell,dsa";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		dsa,ethernet = <&ethport>;
> +		dsa,mii-bus = <&mdio>;
> +
> +		switch@0 {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0 0>;	/* MDIO address 0, switch 0 in tree */
> +
> +			port@0 {
> +				reg = <0>;
> +				label = "lan3";
> +			};
> +
> +			port@1 {
> +				reg = <1>;
> +				label = "lan4";
> +			};
> +
> +			port@2 {
> +				reg = <2>;
> +				label = "wan";
> +			};
> +
> +			port@3 {
> +				reg = <3>;
> +				label = "cpu";
> +			};
> +
> +			port@5 {
> +				reg = <5>;
> +				label = "lan1";
> +			};
> +
> +			port@7 {
> +				reg = <7>;
> +				label = "lan2";
> +			};
> +		};
> +	};
> +};

This all looks sensible, if a bit mixed up. Lets discuss the switch
issue in a different thread.

> +&devbus_bootcs {
> +	status = "okay";
> +
> +	devbus,keep-config;
> +
> +	flash@0 {
> +		compatible = "cfi-flash";
> +		reg = <0 0x800000>;
> +		bank-width = <1>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;

Documentation/devicetree/bindings/mtd/partition.txt says the
partitions should be placed under a partitions node. There are some
conditions when that does not work. So please try it, and if it does
not, ignore my comment...

> +
> +		partition@0 {
> +			label = "kernel";
> +			reg = <0x0 0x100000>;
> +		};
> +
> +		partition@100000 {
> +			label = "rootfs";
> +			reg = <0x100000 0x660000>;
> +		};
> +
> +		partition@760000 {
> +			label = "uboot_env";
> +			reg = <0x760000 0x20000>;
> +		};
> +
> +		partition@780000 {
> +			label = "uboot";
> +			reg = <0x780000 0x80000>;
> +			read-only;
> +		};
> +	};
> +};

> +&pinctrl {
> +	pinctrl-0 = <&pmx_pci_gpios &pmx_ge>;
> +	pinctrl-names = "default";
> +
> +	pmx_power_led: pmx-power-led {
> +		marvell,pins = "mpp0";
> +		marvell,function = "gpio";
> +	};
> +
> +	pmx_reset_switch: pmx-reset-switch {
> +		marvell,pins = "mpp1";
> +		marvell,function = "gpio";
> +	};

Ah, this is missing from your DSA node. You can then add:

reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;

inside the switch@0 node.

> +	pmx_ge: pmx-ge {
> +		marvell,pins = "mpp9", "mpp12",	"mpp13", "mpp14", "mpp15",
> +				"mpp16", "mpp17", "mpp18", "mpp19";
> +		marvell,function = "ge";
> +	};
> +};

This can go into the .dtsi file your previous patch added. 

> +
> +&uart0 {
> +	/* Pin 1: Tx, Pin 7: Rx, Pin 8: Gnd */
> +	status = "okay";

Nice to see the comment.

     Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v0 00/10] Convert Netgear WNR854T to devicetree Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
  [PATCH v0 09/10] net: phy: Re-attempt custom DT configuration after configuration Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 09/10] net: phy: Re-attempt custom DT configuration  after configuration Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:50 +0200
  [PATCH v0 03/10] arm: orion5x: Add clk support for mv88f5181 Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 03/10] arm: orion5x: Add clk support for mv88f5181 Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:20 +0200
    Re: [PATCH v0 03/10] arm: orion5x: Add clk support for mv88f5181 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-07-16 19:40 +0200
    Re: [PATCH v0 03/10] arm: orion5x: Add clk support for mv88f5181 Rob Herring <robh@kernel.org> - 2016-07-17 22:40 +0200
  [PATCH v0 01/10] arm: orion5x: Add required properties for orion-wdt to DT node Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 01/10] arm: orion5x: Add required properties for  orion-wdt to DT node Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:10 +0200
  [PATCH v0 10/10] arm: orion5x: Configure Netgear WNR854T network port LEDs Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
  [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:40 +0200
    Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:40 +0200
    Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Arnd Bergmann <arnd@arndb.de> - 2016-07-16 21:20 +0200
      Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Jamie Lentin <jm@lentin.co.uk> - 2016-07-17 12:10 +0200
        Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Arnd Bergmann <arnd@arndb.de> - 2016-07-17 22:50 +0200
          Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2016-07-18 11:50 +0200
            Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Arnd Bergmann <arnd@arndb.de> - 2016-07-18 12:10 +0200
              Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear WNR854T Arnd Bergmann <arnd@arndb.de> - 2016-07-19 11:50 +0200
              Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Jamie Lentin <jm@lentin.co.uk> - 2016-07-19 12:10 +0200
    Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Rob Herring <robh@kernel.org> - 2016-07-17 23:00 +0200
      Re: [PATCH v0 06/10] arm: orion5x: Add DT-based support for Netgear  WNR854T Jamie Lentin <jm@lentin.co.uk> - 2016-07-19 11:50 +0200
  [PATCH v0 07/10] arm: orion5x: Remove old non-DT-based WNR854T support Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 07/10] arm: orion5x: Remove old non-DT-based WNR854T  support Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:40 +0200
  [PATCH v0 04/10] arm: orion5x: Generalise mv88f5181l pinctrl support for 88f5181 Jamie Lentin <jm@lentin.co.uk> - 2016-07-16 17:10 +0200
    Re: [PATCH v0 04/10] arm: orion5x: Generalise mv88f5181l pinctrl  support for 88f5181 Andrew Lunn <andrew@lunn.ch> - 2016-07-16 18:20 +0200
    Re: [PATCH v0 04/10] arm: orion5x: Generalise mv88f5181l pinctrl  support for 88f5181 Rob Herring <robh@kernel.org> - 2016-07-17 22:50 +0200

csiph-web