MIPS: loongson-ls1b: switch to device tree probe
cover MIPS: loongson-ls1b: switch to device tree probe
New boards should probe from devicetree and
not use the platform registration code.
This patchseries adds device tree stuff for Longson LS1B SoC and Loongson Tech LS1B Demo Board.
Antony Pavlov (3):
MIPS: add Longson LS1B SoC dtsi file
MIPS: add Loongson Tech LS1B Demo Board dts file
MIPS: loongson-ls1b: switch to device tree
arch/mips/boards/loongson-ls1b/Makefile | 1 - arch/mips/boards/loongson-ls1b/ram.c | 12 --------- arch/mips/boards/loongson-ls1b/serial.c | 12 --------- arch/mips/configs/loongson-ls1b_defconfig | 6 +++++ arch/mips/dts/loongson-ls1b.dts | 16 ++++++++++++ arch/mips/dts/ls1b.dtsi | 43 +++++++++++++++++++++++++++++++ 6 files changed, 65 insertions(+), 25 deletions(-) delete mode 100644 arch/mips/boards/loongson-ls1b/ram.c create mode 100644 arch/mips/dts/loongson-ls1b.dts create mode 100644 arch/mips/dts/ls1b.dtsi
Signature · 7 lines
1.9.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/3 MIPS: add Longson LS1B SoC dtsi file
--- arch/mips/dts/ls1b.dtsi | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
arch/mips/dts/ls1b.dtsi new file +43 -0
@@ -0,0 +1,43 @@ +#include "skeleton.dtsi" + +/ { + soc { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + device_type = "soc"; + ranges; + + serial0: serial@bfe40000 { + compatible = "ns16550a"; + reg = <0xbfe40000 0x8>; + reg-shift = <0>; + clock-frequency = <83000000>; + status = "disabled"; + }; + + serial1: serial@bfe44000 { + compatible = "ns16550a"; + reg = <0xbfe44000 0x8>; + reg-shift = <0>; + clock-frequency = <83000000>; + status = "disabled"; + }; + + serial2: serial@bfe48000 { + compatible = "ns16550a"; + reg = <0xbfe48000 0x8>; + reg-shift = <0>; + clock-frequency = <83000000>; + status = "disabled"; + }; + + serial3: serial@bfe4c000 { + compatible = "ns16550a"; + reg = <0xbfe4c000 0x8>; + reg-shift = <0>; + clock-frequency = <83000000>; + status = "disabled"; + }; + }; +};
Signature · 7 lines
1.9.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/3 MIPS: add Loongson Tech LS1B Demo Board dts file
In reply to Antony Pavlov--- arch/mips/dts/loongson-ls1b.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/mips/dts/loongson-ls1b.dts new file +16 -0
@@ -0,0 +1,16 @@ +/dts-v1/; + +#include "ls1b.dtsi" + +/ { + model = "Loongson Tech LS1B Demo Board"; + compatible = "loongson,ls1b"; + + memory { + reg = <0x00000000 0x4000000>; + }; +}; + +&serial2 { + status = "okay"; +};
Signature · 7 lines
1.9.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/3 MIPS: loongson-ls1b: switch to device tree
In reply to Antony Pavlov--- arch/mips/boards/loongson-ls1b/Makefile | 1 - arch/mips/boards/loongson-ls1b/ram.c | 12 ------------ arch/mips/boards/loongson-ls1b/serial.c | 12 ------------ arch/mips/configs/loongson-ls1b_defconfig | 6 ++++++ 4 files changed, 6 insertions(+), 25 deletions(-)
arch/mips/boards/loongson-ls1b/Makefile +0 -1
@@ -1,2 +1 @@ -obj-y += ram.o obj-y += serial.o
arch/mips/boards/loongson-ls1b/ram.c deleted +0 -12
@@ -1,12 +0,0 @@ -#include <common.h> -#include <init.h> -#include <sizes.h> -#include <asm/memory.h> - -static int mem_init (void ) -{ -mips_add_ram0 (SZ_64M ); - -return 0 ; -} -mem_initcall (mem_init);
arch/mips/boards/loongson-ls1b/serial.c +0 -12
@@ -1,22 +1,10 @@#include <common.h> #include <init.h> -#include <ns16550.h> - -#include <mach/loongson1.h> - -static struct NS16550_plat serial_plat = { - .clock =83000000 , - .shift =0 , -};static int console_init (void ) { -barebox_set_model ("Loongson Tech LS1B Demo Board" );barebox_set_hostname ("ls1b" ); -add_ns16550_device (DEVICE_ID_DYNAMIC ,KSEG1ADDR (LS1X_UART2_BASE ), -8 ,IORESOURCE_MEM_8BIT , &serial_plat); -return 0 ; }console_initcall (console_init);
arch/mips/configs/loongson-ls1b_defconfig +6 -0
@@ -1,3 +1,5 @@ +CONFIG_BUILTIN_DTB=y +CONFIG_BUILTIN_DTB_NAME="loongson-ls1b" CONFIG_MACH_MIPS_LOONGSON=y CONFIG_PBL_IMAGE=y CONFIG_STACK_SIZE=0x7000
@@ -36,7 +38,11 @@ CONFIG_CMD_IOMEM=y CONFIG_FLEXIBLE_BOOTARGS=y CONFIG_CMD_RESET=y CONFIG_CMD_GO=y +CONFIG_CMD_OFTREE=y +CONFIG_CMD_OF_PROPERTY=y +CONFIG_CMD_OF_NODE=y CONFIG_CMD_TIMEOUT=y +CONFIG_OFDEVICE=y # CONFIG_SPI is not set CONFIG_ZLIB=y CONFIG_BZLIB=y
Signature · 7 lines
1.9.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 10 lines · Antony Pavlov
New boards should probe from devicetree and
not use the platform registration code.This patchseries adds device tree stuff for Longson LS1B SoC and Loongson Tech LS1B Demo Board.
Antony Pavlov (3):
MIPS: add Longson LS1B SoC dtsi file
MIPS: add Loongson Tech LS1B Demo Board dts file
MIPS: loongson-ls1b: switch to device tree
Applied, thanks.
BTW what's the status of mips devicetree support in Linux Mainline? I sometimes have a look at arch/mips/boot/dts there and find it empty. Does the kernel start with the devicetrees you add to barebox?
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 12 lines · On Tue, 8 Apr 2014 08:06:19 +0200 Sascha Hauer <[email protected]> wrote:
Quoted 10 lines · Antony Pavlov
New boards should probe from devicetree and
not use the platform registration code.This patchseries adds device tree stuff for Longson LS1B SoC and Loongson Tech LS1B Demo Board.
Antony Pavlov (3):
MIPS: add Longson LS1B SoC dtsi file
MIPS: add Loongson Tech LS1B Demo Board dts file
MIPS: loongson-ls1b: switch to device tree
Quoted 5 lines
Applied, thanks.
BTW what's the status of mips devicetree support in Linux Mainline? I sometimes have a look at
arch/mips/boot/dtsthere and find it empty. Does the kernel start with the devicetrees you add to barebox?
linux-mips world is different from linux-arm world in many ways :)
$ find linux.git/arch/mips/ -iname '*dts*' linux.git/arch/mips/mti-sead3/sead3.dts linux.git/arch/mips/boot/dts linux.git/arch/mips/ralink/dts linux.git/arch/mips/ralink/dts/rt2880_eval.dts linux.git/arch/mips/ralink/dts/mt7620a.dtsi linux.git/arch/mips/ralink/dts/rt2880.dtsi linux.git/arch/mips/ralink/dts/rt3883.dtsi linux.git/arch/mips/ralink/dts/rt3883_eval.dts linux.git/arch/mips/ralink/dts/rt3052_eval.dts linux.git/arch/mips/ralink/dts/rt3050.dtsi linux.git/arch/mips/ralink/dts/mt7620a_eval.dts linux.git/arch/mips/lantiq/dts linux.git/arch/mips/lantiq/dts/easy50712.dts linux.git/arch/mips/lantiq/dts/danube.dtsi linux.git/arch/mips/netlogic/dts linux.git/arch/mips/netlogic/dts/xlp_gvp.dts linux.git/arch/mips/netlogic/dts/xlp_evp.dts linux.git/arch/mips/netlogic/dts/xlp_fvp.dts linux.git/arch/mips/netlogic/dts/xlp_svp.dts linux.git/arch/mips/cavium-octeon/octeon_3xxx.dts linux.git/arch/mips/cavium-octeon/octeon_68xx.dts
So there is no support in barebox for a mainline linux dts-capable machine.
I have revived my qemu-malta linux-boot-capable barebox branch (it also introduces PCI support, but I have to clean it):
https://github.com/frantony/barebox/tree/next.mips-malta-elf-linux.20140408
So there is a chance to organize qemu-barebox-linux dts-capable system.
Also AR9331-based system has a chances to be converted to dt. There is some notes on AR9331 support:
* some of AR933x linux-mainline devices are dt-capable (but mips ath79 mainline kernel code is not dt-capable); may be there is some ar933x kernel branch with dt support?
* I have to port AR933x Ethernet driver to barebox so
barebox will be capable to load linux kernel quickly and comfortably;
* kexec code for booting linux kernel already realized for qemu-malta; there are possible some cache support issues (qemu-mips does no support caches), but draft cache support code is already stolen from u-boot.
Loongson developers have no plan to port OpenFirmware in the near future, see this
http://www.linux-mips.org/archives/linux-mips/2014-03/msg00164.html
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 37 lines · Antony Pavlov
Quoted 12 lines · On Tue, 8 Apr 2014 08:06:19 +0200 Sascha Hauer <[email protected]> wrote:
Quoted 10 lines · Antony Pavlov
New boards should probe from devicetree and
not use the platform registration code.This patchseries adds device tree stuff for Longson LS1B SoC and Loongson Tech LS1B Demo Board.
Antony Pavlov (3):
MIPS: add Longson LS1B SoC dtsi file
MIPS: add Loongson Tech LS1B Demo Board dts file
MIPS: loongson-ls1b: switch to device treeQuoted 5 lines
Applied, thanks.
BTW what's the status of mips devicetree support in Linux Mainline? I sometimes have a look at
arch/mips/boot/dtsthere and find it empty. Does the kernel start with the devicetrees you add to barebox?linux-mips world is different from linux-arm world in many ways :)
$ find linux.git/arch/mips/ -iname '*dts*' linux.git/arch/mips/mti-sead3/sead3.dts linux.git/arch/mips/boot/dts linux.git/arch/mips/ralink/dts linux.git/arch/mips/ralink/dts/rt2880_eval.dts linux.git/arch/mips/ralink/dts/mt7620a.dtsi linux.git/arch/mips/ralink/dts/rt2880.dtsi linux.git/arch/mips/ralink/dts/rt3883.dtsi linux.git/arch/mips/ralink/dts/rt3883_eval.dts linux.git/arch/mips/ralink/dts/rt3052_eval.dts linux.git/arch/mips/ralink/dts/rt3050.dtsi linux.git/arch/mips/ralink/dts/mt7620a_eval.dts linux.git/arch/mips/lantiq/dts linux.git/arch/mips/lantiq/dts/easy50712.dts
Quoted 8 lines
linux.git/arch/mips/lantiq/dts/danube.dtsi linux.git/arch/mips/netlogic/dts linux.git/arch/mips/netlogic/dts/xlp_gvp.dts linux.git/arch/mips/netlogic/dts/xlp_evp.dts linux.git/arch/mips/netlogic/dts/xlp_fvp.dts linux.git/arch/mips/netlogic/dts/xlp_svp.dts linux.git/arch/mips/cavium-octeon/octeon_3xxx.dts linux.git/arch/mips/cavium-octeon/octeon_68xx.dts
Ah, there they are.
Quoted 2 lines
So there is no support in barebox for a mainline linux dts-capable machine.
Ok, then we do not need to make the dts files Linux mainline compatible. You probably keep an eye on the mips development so that we won't end up with conflicting devicetrees.
Quoted 4 lines
Loongson developers have no plan to port OpenFirmware in the near future, see this
http://www.linux-mips.org/archives/linux-mips/2014-03/msg00164.html
Uh, not nice :(
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox