Message ID | 1388247131-19301-1-git-send-email-andrew@lunn.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Andrew, On Sat, Dec 28, 2013 at 05:12:11PM +0100, Andrew Lunn wrote: > The Excito Bubba B3 is a home server, single driver NAS box, Wifi nit, s/driver/drive/ > access point, etc. > > Signed-off-by: Andrew Lunn <andrew@lunn.ch> > --- > arch/arm/boot/dts/Makefile | 3 +- > arch/arm/boot/dts/kirkwood-b3.dts | 199 +++++++++++++++++++++++++++++++++++++ > 2 files changed, 201 insertions(+), 1 deletion(-) > create mode 100644 arch/arm/boot/dts/kirkwood-b3.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index adcc6067eb13..0447d726a6bc 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -71,7 +71,8 @@ dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ > dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ > integratorcp.dtb > dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb > -dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ > +dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-b3.dtb \ > + kirkwood-cloudbox.dtb \ > kirkwood-db-88f6281.dtb \ > kirkwood-db-88f6282.dtb \ > kirkwood-dns320.dtb \ > diff --git a/arch/arm/boot/dts/kirkwood-b3.dts b/arch/arm/boot/dts/kirkwood-b3.dts > new file mode 100644 > index 000000000000..7c675db24b6b > --- /dev/null > +++ b/arch/arm/boot/dts/kirkwood-b3.dts > @@ -0,0 +1,199 @@ > +/* > + * Device Tree file for Excito Bubba B3 > + * > + * Copyright (C) 2013, Andrew Lunn <andrew@lunn.ch> > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version > + * 2 of the License, or (at your option) any later version. > + * > + * Note: This requires a new'ish version of u-boot, which disables the > + * L2 cache. If your B3 silently fails to boot, u-boot is probably too > + * old. Either upgrade, or consider the following email: > + * > + * http://lists.debian.org/debian-arm/2012/08/msg00128.html Nice, thanks for adding this. > + */ > + > +/dts-v1/; > + > +#include "kirkwood.dtsi" > +#include "kirkwood-6281.dtsi" > + > +/ { > + model = "Excito B3"; > + compatible = "excito,b3", "marvell,kirkwood-88f6281", "marvell,kirkwood"; > + memory { /* 512 MB */ > + device_type = "memory"; > + reg = <0x00000000 0x20000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,115200n8 earlyprintk"; > + }; > + > + mbus { > + pcie-controller { > + status = "okay"; > + > + /* Wifi model has Atheros chipset on pcie port */ > + pcie@1,0 { > + status = "okay"; > + }; > + }; > + }; > + > + ocp@f1000000 { I plan on going though and sorting the nodes under the ocp bus for all the dts files during the next cycle. Would you mind sorting these so we have one less to worry about? > + pinctrl: pinctrl@10000 { > + pmx_button_power: pmx-button-power { > + marvell,pins = "mpp39"; > + marvell,function = "gpio"; > + }; > + pmx_led_green: pmx-led-green { > + marvell,pins = "mpp38"; > + marvell,function = "gpio"; > + }; > + pmx_led_red: pmx-led-red { > + marvell,pins = "mpp41"; > + marvell,function = "gpio"; > + }; > + pmx_led_blue: pmx-led-blue { > + marvell,pins = "mpp42"; > + marvell,function = "gpio"; > + }; > + pmx_beeper: pmx-beeper { > + marvell,pins = "mpp40"; > + marvell,function = "gpio"; > + }; > + }; > + > + i2c@11000 { > + status = "okay"; > + /* > + * There is something on the bus at address 0x64. > + * Not yet identified what it is, maybe the eeprom > + * for the Atheros WiFi chip? > + */ Not related to accepting this patch, have you found anything in the stock kernel? > + }; > + > + serial@12000 { > + /* Internal on test pins, 3.3v TTL */ Do you have a pointer to a pin layout? > + pinctrl-0 = <&pmx_uart0>; > + pinctrl-names = "default"; > + status = "okay"; > + }; > + > + spi@10600 { > + status = "okay"; > + pinctrl-0 = <&pmx_spi>; > + pinctrl-names = "default"; > + > + m25p16@0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "m25p16"; > + reg = <0>; > + spi-max-frequency = <40000000>; > + mode = <0>; > + > + partition@0 { > + reg = <0x0 0xc0000>; > + label = "u-boot"; > + }; > + > + partition@c0000 { > + reg = <0xc0000 0x20000>; > + label = "u-boot env"; > + }; > + > + partition@e0000 { > + reg = <0xe0000 0x120000>; > + label = "data"; > + }; > + }; > + }; > + > + sata@80000 { > + /* One internal, the second as eSATA */ > + status = "okay"; > + nr-ports = <2>; > + }; > + }; > + > + gpio-leds { > + /* > + * There is one LED "port" on the front and the colours > + * mix together giving some interesting combinations. > + */ > + compatible = "gpio-leds"; > + pinctrl-0 = < &pmx_led_green &pmx_led_red > + &pmx_led_blue >; > + pinctrl-names = "default"; > + > + programming_led { > + label = "bubba3:green:programming"; > + gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; > + linux,default-trigger = "default-off"; Perhaps we can use 'default-state = "off";' here to avoid the linux-specific property? thx, Jason. > + }; > + > + error_led { > + label = "bubba3:red:error"; > + gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; > + }; > + > + active_led { > + label = "bubba3:blue:active"; > + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; > + }; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + pinctrl-0 = <&pmx_button_power>; > + pinctrl-names = "default"; > + > + power-button { > + /* On the back */ > + label = "Power Button"; > + linux,code = <KEY_POWER>; > + gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; > + }; > + }; > + > + beeper: beeper { > + /* 4KHz Piezoelectric buzzer */ > + compatible = "gpio-beeper"; > + pinctrl-0 = <&pmx_beeper>; > + pinctrl-names = "default"; > + gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; > + }; > +}; > + > +&mdio { > + status = "okay"; > + > + ethphy0: ethernet-phy@8 { > + device_type = "ethernet-phy"; > + reg = <8>; > + }; > + > + ethphy1: ethernet-phy@24 { > + device_type = "ethernet-phy"; > + reg = <24>; > + }; > +}; > + > +ð0 { > + status = "okay"; > + ethernet0-port@0 { > + phy-handle = <ðphy0>; > + }; > +}; > + > +ð1 { > + status = "okay"; > + ethernet1-port@0 { > + phy-handle = <ðphy1>; > + }; > +}; > + > -- > 1.7.10.4 >
On Sat, Dec 28, 2013 at 12:01:14PM -0500, Jason Cooper wrote: > Hi Andrew, > > On Sat, Dec 28, 2013 at 05:12:11PM +0100, Andrew Lunn wrote: > > The Excito Bubba B3 is a home server, single driver NAS box, Wifi > > nit, s/driver/drive/ Upps. Thanks > > > + * Note: This requires a new'ish version of u-boot, which disables the > > + * L2 cache. If your B3 silently fails to boot, u-boot is probably too > > + * old. Either upgrade, or consider the following email: > > + * > > + * http://lists.debian.org/debian-arm/2012/08/msg00128.html > > Nice, thanks for adding this. Yes, i was bashing my head against a brick wall before i went googling and found this. > > + ocp@f1000000 { > > I plan on going though and sorting the nodes under the ocp bus for all > the dts files during the next cycle. Would you mind sorting these so we > have one less to worry about? Sure. Sort on what? Address, alphabetic on node name? > > + i2c@11000 { > > + status = "okay"; > > + /* > > + * There is something on the bus at address 0x64. > > + * Not yet identified what it is, maybe the eeprom > > + * for the Atheros WiFi chip? > > + */ > > Not related to accepting this patch, have you found anything in the > stock kernel? There is noting in the vendor kernel. I asked Excito about this maybe two years ago. The guy who answered said there is no i2c device on the base board, but i2c does go to the wifi module, hence the assumption given above. > > > + }; > > + > > + serial@12000 { > > + /* Internal on test pins, 3.3v TTL */ > > Do you have a pointer to a pin layout? Yes, i can add a URL to an Excito forum page. They are friendly about this, document it themselves. > > + programming_led { > > + label = "bubba3:green:programming"; > > + gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; > > + linux,default-trigger = "default-off"; > > Perhaps we can use 'default-state = "off";' here to avoid the > linux-specific property? Sure. v2 in the next day or two. Andrew
Andrew, On Sat, Dec 28, 2013 at 09:59:28PM +0100, Andrew Lunn wrote: > On Sat, Dec 28, 2013 at 12:01:14PM -0500, Jason Cooper wrote: > > On Sat, Dec 28, 2013 at 05:12:11PM +0100, Andrew Lunn wrote: ... > > > + ocp@f1000000 { > > > > I plan on going though and sorting the nodes under the ocp bus for all > > the dts files during the next cycle. Would you mind sorting these so we > > have one less to worry about? > > Sure. Sort on what? Address, alphabetic on node name? address please. ... > > > + }; > > > + > > > + serial@12000 { > > > + /* Internal on test pins, 3.3v TTL */ > > > > Do you have a pointer to a pin layout? > > Yes, i can add a URL to an Excito forum page. They are friendly about > this, document it themselves. ok, considering the transience of web pages, perhaps a little ascii art? Not a show stopper, just if you're inclined. > > > + programming_led { > > > + label = "bubba3:green:programming"; > > > + gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; > > > + linux,default-trigger = "default-off"; > > > > Perhaps we can use 'default-state = "off";' here to avoid the > > linux-specific property? > > Sure. > > v2 in the next day or two. thx, Jason.
On Sat, Dec 28, 2013 at 12:01:14PM -0500, Jason Cooper wrote: > > + * Note: This requires a new'ish version of u-boot, which disables the > > + * L2 cache. If your B3 silently fails to boot, u-boot is probably too > > + * old. Either upgrade, or consider the following email: > > + * > > + * http://lists.debian.org/debian-arm/2012/08/msg00128.html > > Nice, thanks for adding this. Nifty.. But what is the root cause for the above? I'm guessing that at some point the the L1 icache has been enabled, the L1 dcache disabled, and the L2 cache enabled? If the pv_fixup runs with both L1 caches off and an empty L2 then it shouldn't cause a problem. If it runs with the icache on lines will be pulled into the L2 by icache fetching and won't be updated by uncached L1 dcache writes. Is uboot running the kernel with the icache turned on but dcache turned off? From a kernel side, a possible way to address this might be to move the pv fixup (__fixup_a_pv_table?) after the mmu and caches are switched on. But really, any memory writes done prior to enabling the dcache would risk getting lost... Jason
On Thu, 2014-01-02 at 12:49 -0700, Jason Gunthorpe wrote: > On Sat, Dec 28, 2013 at 12:01:14PM -0500, Jason Cooper wrote: > > > > + * Note: This requires a new'ish version of u-boot, which disables the > > > + * L2 cache. If your B3 silently fails to boot, u-boot is probably too > > > + * old. Either upgrade, or consider the following email: > > > + * > > > + * http://lists.debian.org/debian-arm/2012/08/msg00128.html > > > > Nice, thanks for adding this. > > Nifty.. But what is the root cause for the above? > > I'm guessing that at some point the the L1 icache has been enabled, > the L1 dcache disabled, and the L2 cache enabled? > > If the pv_fixup runs with both L1 caches off and an empty L2 then it > shouldn't cause a problem. I'm not 100% sure but I think the issue is that the kernel expects to be running with all of the caches off, but u-boot incorrectly left the l2 on. The L2 is probably not empty (because u-boot was using it). There is some code modifications done at startup (relating to setting paddr offset?) and since the kernel expects caches to be off it doesn't do any cache maintenance. Which means that things don't work as expected, because stuff is cached in L2 dcache and therefore not seen in the instruction stream (Either icached or uncached). Anyway, regardless of the specifics running with caches on when the kernel thinks they are off is going to cause all sorts of oddness... Ian.
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index adcc6067eb13..0447d726a6bc 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -71,7 +71,8 @@ dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \ dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ integratorcp.dtb dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb -dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ +dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-b3.dtb \ + kirkwood-cloudbox.dtb \ kirkwood-db-88f6281.dtb \ kirkwood-db-88f6282.dtb \ kirkwood-dns320.dtb \ diff --git a/arch/arm/boot/dts/kirkwood-b3.dts b/arch/arm/boot/dts/kirkwood-b3.dts new file mode 100644 index 000000000000..7c675db24b6b --- /dev/null +++ b/arch/arm/boot/dts/kirkwood-b3.dts @@ -0,0 +1,199 @@ +/* + * Device Tree file for Excito Bubba B3 + * + * Copyright (C) 2013, Andrew Lunn <andrew@lunn.ch> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Note: This requires a new'ish version of u-boot, which disables the + * L2 cache. If your B3 silently fails to boot, u-boot is probably too + * old. Either upgrade, or consider the following email: + * + * http://lists.debian.org/debian-arm/2012/08/msg00128.html + */ + +/dts-v1/; + +#include "kirkwood.dtsi" +#include "kirkwood-6281.dtsi" + +/ { + model = "Excito B3"; + compatible = "excito,b3", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + memory { /* 512 MB */ + device_type = "memory"; + reg = <0x00000000 0x20000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + mbus { + pcie-controller { + status = "okay"; + + /* Wifi model has Atheros chipset on pcie port */ + pcie@1,0 { + status = "okay"; + }; + }; + }; + + ocp@f1000000 { + pinctrl: pinctrl@10000 { + pmx_button_power: pmx-button-power { + marvell,pins = "mpp39"; + marvell,function = "gpio"; + }; + pmx_led_green: pmx-led-green { + marvell,pins = "mpp38"; + marvell,function = "gpio"; + }; + pmx_led_red: pmx-led-red { + marvell,pins = "mpp41"; + marvell,function = "gpio"; + }; + pmx_led_blue: pmx-led-blue { + marvell,pins = "mpp42"; + marvell,function = "gpio"; + }; + pmx_beeper: pmx-beeper { + marvell,pins = "mpp40"; + marvell,function = "gpio"; + }; + }; + + i2c@11000 { + status = "okay"; + /* + * There is something on the bus at address 0x64. + * Not yet identified what it is, maybe the eeprom + * for the Atheros WiFi chip? + */ + }; + + serial@12000 { + /* Internal on test pins, 3.3v TTL */ + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; + status = "okay"; + }; + + spi@10600 { + status = "okay"; + pinctrl-0 = <&pmx_spi>; + pinctrl-names = "default"; + + m25p16@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "m25p16"; + reg = <0>; + spi-max-frequency = <40000000>; + mode = <0>; + + partition@0 { + reg = <0x0 0xc0000>; + label = "u-boot"; + }; + + partition@c0000 { + reg = <0xc0000 0x20000>; + label = "u-boot env"; + }; + + partition@e0000 { + reg = <0xe0000 0x120000>; + label = "data"; + }; + }; + }; + + sata@80000 { + /* One internal, the second as eSATA */ + status = "okay"; + nr-ports = <2>; + }; + }; + + gpio-leds { + /* + * There is one LED "port" on the front and the colours + * mix together giving some interesting combinations. + */ + compatible = "gpio-leds"; + pinctrl-0 = < &pmx_led_green &pmx_led_red + &pmx_led_blue >; + pinctrl-names = "default"; + + programming_led { + label = "bubba3:green:programming"; + gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-off"; + }; + + error_led { + label = "bubba3:red:error"; + gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + }; + + active_led { + label = "bubba3:blue:active"; + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-0 = <&pmx_button_power>; + pinctrl-names = "default"; + + power-button { + /* On the back */ + label = "Power Button"; + linux,code = <KEY_POWER>; + gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; + }; + }; + + beeper: beeper { + /* 4KHz Piezoelectric buzzer */ + compatible = "gpio-beeper"; + pinctrl-0 = <&pmx_beeper>; + pinctrl-names = "default"; + gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; + }; +}; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@8 { + device_type = "ethernet-phy"; + reg = <8>; + }; + + ethphy1: ethernet-phy@24 { + device_type = "ethernet-phy"; + reg = <24>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; + +ð1 { + status = "okay"; + ethernet1-port@0 { + phy-handle = <ðphy1>; + }; +}; +
The Excito Bubba B3 is a home server, single driver NAS box, Wifi access point, etc. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/kirkwood-b3.dts | 199 +++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/kirkwood-b3.dts