arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
/dts-v1/;
|
|
|
|
|
2013-08-06 22:01:19 +07:00
|
|
|
#include "kirkwood-nsa310-common.dtsi"
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
|
|
|
|
/ {
|
|
|
|
compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
|
|
|
|
|
|
|
memory {
|
|
|
|
device_type = "memory";
|
|
|
|
reg = <0x00000000 0x10000000>;
|
|
|
|
};
|
|
|
|
|
|
|
|
chosen {
|
|
|
|
bootargs = "console=ttyS0,115200";
|
|
|
|
};
|
|
|
|
|
2013-07-26 20:18:05 +07:00
|
|
|
mbus {
|
|
|
|
pcie-controller {
|
|
|
|
status = "okay";
|
|
|
|
|
|
|
|
pcie@1,0 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
ocp@f1000000 {
|
2013-01-27 03:50:14 +07:00
|
|
|
pinctrl: pinctrl@10000 {
|
2013-05-24 16:44:53 +07:00
|
|
|
pinctrl-0 = <&pmx_unknown>;
|
2013-01-27 03:50:14 +07:00
|
|
|
pinctrl-names = "default";
|
|
|
|
|
|
|
|
pmx_led_esata_green: pmx-led-esata-green {
|
|
|
|
marvell,pins = "mpp12";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_led_esata_red: pmx-led-esata-red {
|
|
|
|
marvell,pins = "mpp13";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_led_usb_green: pmx-led-usb-green {
|
|
|
|
marvell,pins = "mpp15";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_led_usb_red: pmx-led-usb-red {
|
|
|
|
marvell,pins = "mpp16";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_led_sys_green: pmx-led-sys-green {
|
|
|
|
marvell,pins = "mpp28";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_led_sys_red: pmx-led-sys-red {
|
|
|
|
marvell,pins = "mpp29";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_btn_reset: pmx-btn-reset {
|
|
|
|
marvell,pins = "mpp36";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_btn_copy: pmx-btn-copy {
|
|
|
|
marvell,pins = "mpp37";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_led_copy_green: pmx-led-copy-green {
|
|
|
|
marvell,pins = "mpp39";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_led_copy_red: pmx-led-copy-red {
|
|
|
|
marvell,pins = "mpp40";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_led_hdd_green: pmx-led-hdd-green {
|
|
|
|
marvell,pins = "mpp41";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_led_hdd_red: pmx-led-hdd-red {
|
|
|
|
marvell,pins = "mpp42";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_unknown: pmx-unknown {
|
|
|
|
marvell,pins = "mpp44";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
|
|
|
|
|
|
|
pmx_btn_power: pmx-btn-power {
|
|
|
|
marvell,pins = "mpp46";
|
|
|
|
marvell,function = "gpio";
|
|
|
|
};
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
i2c@11000 {
|
|
|
|
status = "okay";
|
2012-12-28 21:08:50 +07:00
|
|
|
|
|
|
|
adt7476: adt7476a@2e {
|
|
|
|
compatible = "adt7476";
|
|
|
|
reg = <0x2e>;
|
|
|
|
};
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio_keys {
|
|
|
|
compatible = "gpio-keys";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
2013-05-24 16:44:53 +07:00
|
|
|
pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
|
|
|
|
pinctrl-names = "default";
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
|
|
|
|
button@1 {
|
|
|
|
label = "Power Button";
|
2013-12-04 22:51:38 +07:00
|
|
|
linux,code = <KEY_POWER>;
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
gpios = <&gpio1 14 0>;
|
|
|
|
};
|
|
|
|
button@2 {
|
|
|
|
label = "Copy Button";
|
2013-12-04 22:51:38 +07:00
|
|
|
linux,code = <KEY_COPY>;
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
gpios = <&gpio1 5 1>;
|
|
|
|
};
|
|
|
|
button@3 {
|
|
|
|
label = "Reset Button";
|
2013-12-04 22:51:38 +07:00
|
|
|
linux,code = <KEY_RESTART>;
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
gpios = <&gpio1 4 1>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gpio-leds {
|
|
|
|
compatible = "gpio-leds";
|
2013-05-24 16:44:53 +07:00
|
|
|
pinctrl-0 = <&pmx_led_esata_green &pmx_led_esata_red
|
|
|
|
&pmx_led_usb_green &pmx_led_usb_red
|
|
|
|
&pmx_led_sys_green &pmx_led_sys_red
|
|
|
|
&pmx_led_copy_green &pmx_led_copy_red
|
|
|
|
&pmx_led_hdd_green &pmx_led_hdd_red>;
|
|
|
|
pinctrl-names = "default";
|
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew
> > +#define NSA310_GPIO_LED_ESATA_GREEN 12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF 48
>
> It looks like most of these are not used. Please remove them.
True. Fixed.
> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > + {
> > + .name = "uboot",
> > + .offset = 0,
> > + .size = 0x100000,
> > + .mask_flags = MTD_WRITEABLE,
> > + }, {
> > <..>
> You should be able to put all that into DT. Take a look at
Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.
> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > + { I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
> i2c@11000 {
> status = "okay";
> clock-frequency = <400000>;
Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?
Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.
Best regards,
Tero
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-26 22:56:16 +07:00
|
|
|
|
|
|
|
green-sys {
|
|
|
|
label = "nsa310:green:sys";
|
|
|
|
gpios = <&gpio0 28 0>;
|
|
|
|
};
|
|
|
|
red-sys {
|
|
|
|
label = "nsa310:red:sys";
|
|
|
|
gpios = <&gpio0 29 0>;
|
|
|
|
};
|
|
|
|
green-hdd {
|
|
|
|
label = "nsa310:green:hdd";
|
|
|
|
gpios = <&gpio1 9 0>;
|
|
|
|
};
|
|
|
|
red-hdd {
|
|
|
|
label = "nsa310:red:hdd";
|
|
|
|
gpios = <&gpio1 10 0>;
|
|
|
|
};
|
|
|
|
green-esata {
|
|
|
|
label = "nsa310:green:esata";
|
|
|
|
gpios = <&gpio0 12 0>;
|
|
|
|
};
|
|
|
|
red-esata {
|
|
|
|
label = "nsa310:red:esata";
|
|
|
|
gpios = <&gpio0 13 0>;
|
|
|
|
};
|
|
|
|
green-usb {
|
|
|
|
label = "nsa310:green:usb";
|
|
|
|
gpios = <&gpio0 15 0>;
|
|
|
|
};
|
|
|
|
red-usb {
|
|
|
|
label = "nsa310:red:usb";
|
|
|
|
gpios = <&gpio0 16 0>;
|
|
|
|
};
|
|
|
|
green-copy {
|
|
|
|
label = "nsa310:green:copy";
|
|
|
|
gpios = <&gpio1 7 0>;
|
|
|
|
};
|
|
|
|
red-copy {
|
|
|
|
label = "nsa310:red:copy";
|
|
|
|
gpios = <&gpio1 8 0>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|