diff options
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/fdt/dts/bindings-localbus.txt | 83 | ||||
-rw-r--r-- | sys/boot/fdt/dts/db78100.dts | 19 | ||||
-rw-r--r-- | sys/boot/fdt/dts/db88f6281.dts | 39 | ||||
-rw-r--r-- | sys/boot/fdt/dts/sheevaplug.dts | 34 | ||||
-rw-r--r-- | sys/boot/uboot/lib/api_public.h | 1 | ||||
-rw-r--r-- | sys/boot/uboot/lib/glue.c | 3 |
6 files changed, 109 insertions, 70 deletions
diff --git a/sys/boot/fdt/dts/bindings-localbus.txt b/sys/boot/fdt/dts/bindings-localbus.txt new file mode 100644 index 0000000..d960fef --- /dev/null +++ b/sys/boot/fdt/dts/bindings-localbus.txt @@ -0,0 +1,83 @@ +$FreeBSD$ + +Marvell Device bus (localbus) configuration. +============================================ + +1. Properties for localbus nodes + +1.1 ranges + +Property: ranges + +Value type: <prop-encoded-array> encoded as arbitrary number of localbus + nodes specifiers. + +Description: ranges property defines values used for mapping devices + connected to localbus, in Marvell devices it is used also for + setting decoding windows. + + a) child node address-cells: + - first cell: number of bank (chip select) + - second cell: (Marvell devices) Target ID for decoding + windows setup + + b) parent node address cells: + - address offset: used with parent's node base address to + specify base address of mapped device + + c) child node size-cells: + - size: defines amount of memory that should be reserved for + device + +1.2 bank-count + +Property: bank-count + +Value type: <u32> + +Description: The bank_count property defines maximum number of banks on + localbus node. Bank is most often interpreted as device chip + select, but may also describe another device (e.g. SPI flash). + +1.3 Example + + localbus@0 { + #address-cells = <2>; + #size-cells = <1>; + compatible = "mrvl,lbc"; + bank-count = <5>; + + /* This reflects CPU decode windows setup. */ + ranges = <0x0 0x2f 0xb2200000 0x00100000 + 0x1 0x3e 0xb2100000 0x00100000 + 0x2 0x3d 0xb0000000 0x02000000 + 0x3 0x3b 0xb2000000 0x00100000>; + }; + +2. Properties for localbus consumer nodes: + +2.1 reg + +Property: reg + +Value type: <prop-encoded-array> + +Description: A standard property required for localbus child nodes. Defines + the device memory region. + + a) first cell: number of bank (chip select) + + b) address offset: used with address offset from parent's ranges + for corresponding bank to specify base address of + the device + + c) size: defines size of the device memory region + +2.2 Example + + nor@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x00100000>; + }; diff --git a/sys/boot/fdt/dts/db78100.dts b/sys/boot/fdt/dts/db78100.dts index caebaf1..8a9e91c 100644 --- a/sys/boot/fdt/dts/db78100.dts +++ b/sys/boot/fdt/dts/db78100.dts @@ -69,25 +69,23 @@ reg = <0x0 0x20000000>; // 512M at 0x0 }; - localbus@f1000000 { + localbus@0 { #address-cells = <2>; #size-cells = <1>; compatible = "mrvl,lbc"; - win-count = <14>; + bank-count = <5>; /* This reflects CPU decode windows setup. */ - ranges = <0x0 0x0f 0xf9300000 0x00100000 - 0x1 0x1e 0xfa000000 0x00100000 - 0x2 0x1d 0xfa100000 0x02000000 - 0x3 0x1b 0xfc100000 0x00000400>; + ranges = <0x0 0x2f 0xf9300000 0x00100000 + 0x1 0x3e 0xf9400000 0x00100000 + 0x2 0x3d 0xf9500000 0x02000000 + 0x3 0x3b 0xfb500000 0x00100000>; nor@0,0 { #address-cells = <1>; #size-cells = <1>; compatible = "cfi-flash"; reg = <0x0 0x0 0x00100000>; - bank-width = <2>; - device-width = <1>; }; led@1,0 { @@ -102,16 +100,13 @@ #size-cells = <1>; compatible = "cfi-flash"; reg = <0x2 0x0 0x02000000>; - bank-width = <2>; - device-width = <1>; }; nand@3,0 { #address-cells = <1>; #size-cells = <1>; + compatible = "mrvl,nfc"; reg = <0x3 0x0 0x00100000>; - bank-width = <2>; - device-width = <1>; }; }; diff --git a/sys/boot/fdt/dts/db88f6281.dts b/sys/boot/fdt/dts/db88f6281.dts index fd4cdad..66cd8a7 100644 --- a/sys/boot/fdt/dts/db88f6281.dts +++ b/sys/boot/fdt/dts/db88f6281.dts @@ -72,48 +72,24 @@ reg = <0x0 0x20000000>; // 512M at 0x0 }; - localbus@f1000000 { + localbus@0 { #address-cells = <2>; #size-cells = <1>; compatible = "mrvl,lbc"; + bank-count = <3>; /* This reflects CPU decode windows setup. */ - ranges = <0x0 0x0f 0xf9300000 0x00100000 - 0x1 0x1e 0xfa000000 0x00100000 - 0x2 0x1d 0xfa100000 0x02000000 - 0x3 0x1b 0xfc100000 0x00000400>; + ranges = <0x0 0x2f 0xf9300000 0x00100000>; - nor@0,0 { + nand@0,0 { #address-cells = <1>; #size-cells = <1>; - compatible = "cfi-flash"; + compatible = "mrvl,nfc"; reg = <0x0 0x0 0x00100000>; bank-width = <2>; device-width = <1>; - }; - - led@1,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "led"; - reg = <0x1 0x0 0x00100000>; - }; - nor@2,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "cfi-flash"; - reg = <0x2 0x0 0x02000000>; - bank-width = <2>; - device-width = <1>; - }; - nand@3,0 { - #address-cells = <1>; - #size-cells = <1>; - reg = <0x3 0x0 0x00100000>; - bank-width = <2>; - device-width = <1>; }; }; @@ -305,4 +281,9 @@ 0x0 0x00100000>; }; }; + + chosen { + stdin = "serial0"; + stdout = "serial0"; + }; }; diff --git a/sys/boot/fdt/dts/sheevaplug.dts b/sys/boot/fdt/dts/sheevaplug.dts index cbfde62..55ca032 100644 --- a/sys/boot/fdt/dts/sheevaplug.dts +++ b/sys/boot/fdt/dts/sheevaplug.dts @@ -71,48 +71,24 @@ reg = <0x0 0x20000000>; // 512M at 0x0 }; - localbus@f1000000 { + localbus@0 { #address-cells = <2>; #size-cells = <1>; compatible = "mrvl,lbc"; + bank-count = <3>; /* This reflects CPU decode windows setup. */ - ranges = <0x0 0x0f 0xf9300000 0x00100000 - 0x1 0x1e 0xfa000000 0x00100000 - 0x2 0x1d 0xfa100000 0x02000000 - 0x3 0x1b 0xfc100000 0x00000400>; + ranges = <0x0 0x2f 0xf9300000 0x00100000>; - nor@0,0 { + nand@0,0 { #address-cells = <1>; #size-cells = <1>; - compatible = "cfi-flash"; + compatible = "mrvl,nfc"; reg = <0x0 0x0 0x00100000>; bank-width = <2>; device-width = <1>; - }; - led@1,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "led"; - reg = <0x1 0x0 0x00100000>; - }; - - nor@2,0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "cfi-flash"; - reg = <0x2 0x0 0x02000000>; - bank-width = <2>; - device-width = <1>; - }; - nand@3,0 { - #address-cells = <1>; - #size-cells = <1>; - reg = <0x3 0x0 0x00100000>; - bank-width = <2>; - device-width = <1>; }; }; diff --git a/sys/boot/uboot/lib/api_public.h b/sys/boot/uboot/lib/api_public.h index b0140c5..9537479 100644 --- a/sys/boot/uboot/lib/api_public.h +++ b/sys/boot/uboot/lib/api_public.h @@ -132,6 +132,7 @@ typedef unsigned long lbastart_t; #define DT_STOR_SCSI 0x0020 #define DT_STOR_USB 0x0040 #define DT_STOR_MMC 0x0080 +#define DT_STOR_NAND 0x0100 #define DEV_STA_CLOSED 0x0000 /* invalid, closed */ #define DEV_STA_OPEN 0x0001 /* open i.e. active */ diff --git a/sys/boot/uboot/lib/glue.c b/sys/boot/uboot/lib/glue.c index f154dc6..df12a7d 100644 --- a/sys/boot/uboot/lib/glue.c +++ b/sys/boot/uboot/lib/glue.c @@ -407,6 +407,9 @@ ub_stor_type(int type) if (type & DT_STOR_MMC) return ("MMC"); + if (type & DT_STOR_NAND) + return ("NAND"); + return ("Unknown"); } |