Message ID | 20131030195724.GI26784@titan.lakedaemon.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Dear Jason Cooper, On Wed, 30 Oct 2013 15:57:25 -0400, Jason Cooper wrote: > > + partition@0 { > > + label = "uboot"; > > + reg = <0x0 0x1c0000>; > > + }; > > + > > + partition@90000 { > > + label = "env"; > > + reg = <0x1c0000 0x2c0000>; > > + }; > > Hmm, something doesn't look right here. Cut-n-paste problem? Did you > run 'make dtbs' against this? I get address size errors when I do. Strange. 'make dtbs' was working here. What was wrong exactly? Just that the unit address (@90000) didn't match the starting address 0x1c0000 ? > let me know if it's ok with you and I'll push it tomorrow. This all looks good to me! Thanks a lot, Thomas
On 31/10/2013 09:37, Thomas Petazzoni wrote: > Dear Jason Cooper, > > On Wed, 30 Oct 2013 15:57:25 -0400, Jason Cooper wrote: > >>> + partition@0 { >>> + label = "uboot"; >>> + reg = <0x0 0x1c0000>; >>> + }; >>> + >>> + partition@90000 { >>> + label = "env"; >>> + reg = <0x1c0000 0x2c0000>; >>> + }; >> >> Hmm, something doesn't look right here. Cut-n-paste problem? Did you >> run 'make dtbs' against this? I get address size errors when I do. > > Strange. 'make dtbs' was working here. What was wrong exactly? Just > that the unit address (@90000) didn't match the starting address > 0x1c0000 ? The unit address has no special meaning for the device tree it's just a way to give a unique name to a node right? So in this case it is not really a problem, but it's just nicer for the coherency of the information in the dt to have the unit address which match the starting address. I also do a make dtbs ans I didn't get any errors: $ make dtbs [...] DTC arch/arm/boot/dts/kirkwood-openblocks_a6.dtb DTC arch/arm/boot/dts/kirkwood-openblocks_a7.dtb Regards, > >> let me know if it's ok with you and I'll push it tomorrow. > > This all looks good to me! > > Thanks a lot, > > Thomas >
Dear Gregory CLEMENT, On Thu, 31 Oct 2013 10:17:43 +0100, Gregory CLEMENT wrote: > > Strange. 'make dtbs' was working here. What was wrong exactly? Just > > that the unit address (@90000) didn't match the starting address > > 0x1c0000 ? > > The unit address has no special meaning for the device tree it's just a > way to give a unique name to a node right? Yes, that's also my understanding. > So in this case it is not really a problem, but it's just nicer for the > coherency of the information in the dt to have the unit address which match > the starting address. Indeed, it's much better if they match (shame on me for the silly copy/paste), but having then *not* matching should not cause any DTC error, I believe. > I also do a make dtbs ans I didn't get any errors: > $ make dtbs > [...] > DTC arch/arm/boot/dts/kirkwood-openblocks_a6.dtb > DTC arch/arm/boot/dts/kirkwood-openblocks_a7.dtb Same here. Thomas
On Thu, Oct 31, 2013 at 10:21:23AM +0100, Thomas Petazzoni wrote: > Dear Gregory CLEMENT, > > On Thu, 31 Oct 2013 10:17:43 +0100, Gregory CLEMENT wrote: > > > > Strange. 'make dtbs' was working here. What was wrong exactly? Just > > > that the unit address (@90000) didn't match the starting address > > > 0x1c0000 ? > > > > The unit address has no special meaning for the device tree it's just a > > way to give a unique name to a node right? > > Yes, that's also my understanding. Correct, that's not what caused the error. > > So in this case it is not really a problem, but it's just nicer for the > > coherency of the information in the dt to have the unit address which match > > the starting address. > > Indeed, it's much better if they match (shame on me for the silly > copy/paste), but having then *not* matching should not cause any DTC > error, I believe. > > > I also do a make dtbs ans I didn't get any errors: > > $ make dtbs > > [...] > > DTC arch/arm/boot/dts/kirkwood-openblocks_a6.dtb > > DTC arch/arm/boot/dts/kirkwood-openblocks_a7.dtb > > Same here. With Thomas' original patch (on top of mvebu/dt, based on v3.12-rc1): $ make kirkwood_defconfig $ make dtbs ... DTC arch/arm/boot/dts/kirkwood-openblocks_a6.dtb DTC arch/arm/boot/dts/kirkwood-openblocks_a7.dtb Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@0 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@90000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@d4000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@f4000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@4f4000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@2214000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@0 Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@0 Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@90000 Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@90000 Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@d4000 Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@d4000 Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@f4000 Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@f4000 Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@4f4000 Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@4f4000 Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@2214000 Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@2214000 thx, Jason.
On 31/10/2013 13:50, Jason Cooper wrote: > On Thu, Oct 31, 2013 at 10:21:23AM +0100, Thomas Petazzoni wrote: >> Dear Gregory CLEMENT, >> >> On Thu, 31 Oct 2013 10:17:43 +0100, Gregory CLEMENT wrote: >> >>>> Strange. 'make dtbs' was working here. What was wrong exactly? Just >>>> that the unit address (@90000) didn't match the starting address >>>> 0x1c0000 ? >>> >>> The unit address has no special meaning for the device tree it's just a >>> way to give a unique name to a node right? >> >> Yes, that's also my understanding. > > Correct, that's not what caused the error. > >>> So in this case it is not really a problem, but it's just nicer for the >>> coherency of the information in the dt to have the unit address which match >>> the starting address. >> >> Indeed, it's much better if they match (shame on me for the silly >> copy/paste), but having then *not* matching should not cause any DTC >> error, I believe. >> >>> I also do a make dtbs ans I didn't get any errors: >>> $ make dtbs >>> [...] >>> DTC arch/arm/boot/dts/kirkwood-openblocks_a6.dtb >>> DTC arch/arm/boot/dts/kirkwood-openblocks_a7.dtb >> >> Same here. > > With Thomas' original patch (on top of mvebu/dt, based on v3.12-rc1): On my side I tested the patch on top on v3.12-rc7. So the difference should be there. > > $ make kirkwood_defconfig > $ make dtbs > ... > DTC arch/arm/boot/dts/kirkwood-openblocks_a6.dtb > DTC arch/arm/boot/dts/kirkwood-openblocks_a7.dtb > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@0 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@90000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@d4000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@f4000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@4f4000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@2214000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@0 > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@0 > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@90000 > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@90000 > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@d4000 > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@d4000 > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@f4000 > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@f4000 > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@4f4000 > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@4f4000 > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@2214000 > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@2214000 > > thx, > > Jason. > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >
On Thu, Oct 31, 2013 at 01:54:42PM +0100, Gregory CLEMENT wrote: > On 31/10/2013 13:50, Jason Cooper wrote: > > On Thu, Oct 31, 2013 at 10:21:23AM +0100, Thomas Petazzoni wrote: > >> Dear Gregory CLEMENT, > >> > >> On Thu, 31 Oct 2013 10:17:43 +0100, Gregory CLEMENT wrote: > >> > >>>> Strange. 'make dtbs' was working here. What was wrong exactly? Just > >>>> that the unit address (@90000) didn't match the starting address > >>>> 0x1c0000 ? > >>> > >>> The unit address has no special meaning for the device tree it's just a > >>> way to give a unique name to a node right? > >> > >> Yes, that's also my understanding. > > > > Correct, that's not what caused the error. > > > >>> So in this case it is not really a problem, but it's just nicer for the > >>> coherency of the information in the dt to have the unit address which match > >>> the starting address. > >> > >> Indeed, it's much better if they match (shame on me for the silly > >> copy/paste), but having then *not* matching should not cause any DTC > >> error, I believe. > >> > >>> I also do a make dtbs ans I didn't get any errors: > >>> $ make dtbs > >>> [...] > >>> DTC arch/arm/boot/dts/kirkwood-openblocks_a6.dtb > >>> DTC arch/arm/boot/dts/kirkwood-openblocks_a7.dtb > >> > >> Same here. > > > > With Thomas' original patch (on top of mvebu/dt, based on v3.12-rc1): > > On my side I tested the patch on top on v3.12-rc7. So the difference should > be there. Ok, I get no warnings when I rebase the original patch onto v3.12-rc7. Since Thomas is ok with my version, I'm going to send it up since it doesn't generate warnings. There's no point merging in v3.12-rc7 just to silence a few warnings. thx, Jason. > > $ make kirkwood_defconfig > > $ make dtbs > > ... > > DTC arch/arm/boot/dts/kirkwood-openblocks_a6.dtb > > DTC arch/arm/boot/dts/kirkwood-openblocks_a7.dtb > > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@0 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@90000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@d4000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@f4000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@4f4000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > > Warning (reg_format): "reg" property in /ocp@f1000000/nand@3000000/partition@2214000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) > > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@0 > > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@0 > > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@90000 > > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@90000 > > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@d4000 > > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@d4000 > > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@f4000 > > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@f4000 > > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@4f4000 > > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@4f4000 > > Warning (avoid_default_addr_size): Relying on default #address-cells value for /ocp@f1000000/nand@3000000/partition@2214000 > > Warning (avoid_default_addr_size): Relying on default #size-cells value for /ocp@f1000000/nand@3000000/partition@2214000
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5b832744a0bb..f2b1c33efbfc 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -95,12 +95,13 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ kirkwood-ns2mini.dtb \ kirkwood-nsa310.dtb \ kirkwood-nsa310a.dtb \ + kirkwood-openblocks_a6.dtb \ + kirkwood-openblocks_a7.dtb \ kirkwood-sheevaplug.dtb \ kirkwood-sheevaplug-esata.dtb \ kirkwood-topkick.dtb \ kirkwood-ts219-6281.dtb \ - kirkwood-ts219-6282.dtb \ - kirkwood-openblocks_a6.dtb + kirkwood-ts219-6282.dtb dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ msm8960-cdp.dtb diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts new file mode 100644 index 000000000000..851fb2a60f20 --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts @@ -0,0 +1,223 @@ +/* + * Device Tree file for OpenBlocks A7 board + * + * Copyright (C) 2013 Free Electrons + * + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +/dts-v1/; + +#include "kirkwood.dtsi" +#include "kirkwood-6282.dtsi" + +/ { + model = "Plat'Home OpenBlocksA7"; + compatible = "plathome,openblocks-a7", "marvell,kirkwood-88f6283", "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x40000000>; /* 1 GB */ + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + ocp@f1000000 { + serial@12000 { + status = "ok"; + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; + }; + + serial@12100 { + status = "ok"; + pinctrl-0 = <&pmx_uart1>; + pinctrl-names = "default"; + }; + + sata@80000 { + nr-ports = <1>; + status = "okay"; + }; + + i2c@11100 { + status = "okay"; + pinctrl-0 = <&pmx_twsi1>; + pinctrl-names = "default"; + + s24c02: s24c02@50 { + compatible = "24c02"; + reg = <0x50>; + }; + }; + + pinctrl: pinctrl@10000 { + pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>; + pinctrl-names = "default"; + + pmx_uart0: pmx-uart0 { + marvell,pins = "mpp10", "mpp11", "mpp15", + "mpp16"; + marvell,function = "uart0"; + }; + + pmx_uart1: pmx-uart1 { + marvell,pins = "mpp13", "mpp14", "mpp8", + "mpp9"; + marvell,function = "uart1"; + }; + + pmx_sysrst: pmx-sysrst { + marvell,pins = "mpp6"; + marvell,function = "sysrst"; + }; + + pmx_dip_switches: pmx-dip-switches { + marvell,pins = "mpp44", "mpp45", "mpp46", "mpp47"; + marvell,function = "gpio"; + }; + + /* + * Accessible on connector J202. The MPP + * listed below are pin 1-7, pin 8 is unused, + * pin 9 is external reset input and pin 10 is + * ground. + */ + pmx_gpio_header: pmx-gpio-header { + marvell,pins = "mpp17", "mpp7", "mpp29", "mpp28", + "mpp35", "mpp34", "mpp40"; + marvell,function = "gpio"; + }; + + pmx_gpio_init: pmx-init { + marvell,pins = "mpp38"; + marvell,function = "gpio"; + }; + + pmx_usb_oc: pmx-usb-oc { + marvell,pins = "mpp39"; + marvell,function = "gpio"; + }; + + pmx_leds: pmx-leds { + marvell,pins = "mpp41", "mpp42", "mpp43"; + marvell,function = "gpio"; + }; + + pmx_ge1: pmx-ge1 { + marvell,pins = "mpp20", "mpp21", "mpp22", "mpp23", + "mpp24", "mpp25", "mpp26", "mpp27", + "mpp30", "mpp31", "mpp32", "mpp33"; + marvell,function = "ge1"; + }; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-0 = <&pmx_leds>; + pinctrl-names = "default"; + + led-red { + label = "obsa7:red:stat"; + gpios = <&gpio1 9 1>; + }; + + led-green { + label = "obsa7:green:stat"; + gpios = <&gpio1 10 1>; + }; + + led-yellow { + label = "obsa7:yellow:stat"; + gpios = <&gpio1 11 1>; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + pinctrl-0 = <&pmx_gpio_init>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + + button@1 { + label = "Init Button"; + linux,code = <116>; + gpios = <&gpio1 6 0>; + }; + }; +}; + +&nand { + chip-delay = <25>; + status = "okay"; + pinctrl-0 = <&pmx_nand>; + pinctrl-names = "default"; + + partition@0 { + label = "uboot"; + reg = <0x0 0x1c0000>; + }; + + partition@1c0000 { + label = "env"; + reg = <0x1c0000 0x2c0000>; + }; + + partition@480000 { + label = "test"; + reg = <0x480000 0x160000>; + }; + + partition@5e0000 { + label = "conf"; + reg = <0x5e0000 0x540000>; + }; + + partition@b20000 { + label = "linux"; + reg = <0xb20000 0x3d40000>; + }; + + partition@4860000 { + label = "user"; + reg = <0x4860000 0xb7a0000>; + }; +}; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + device_type = "ethernet-phy"; + reg = <0>; + }; + + ethphy1: ethernet-phy@1 { + device_type = "ethernet-phy"; + reg = <1>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; + +ð1 { + status = "okay"; + pinctrl-0 = <&pmx_ge1>; + pinctrl-names = "default"; + ethernet1-port@0 { + phy-handle = <ðphy1>; + }; +};