All of lore.kernel.org
 help / color / mirror / Atom feed
From: bodhi bodhi <mibodhi@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 09/12] ARM: kirkwood: Add device-tree for nsa310s
Date: Wed, 9 May 2018 11:27:07 -0700	[thread overview]
Message-ID: <CAJaLiFxKhcyU4cqnB09hRHT4r3kmsqSMkstUDSvNQmzC0__Lag@mail.gmail.com> (raw)
In-Reply-To: <20180508103421.8422-10-judge.packham@gmail.com>

Hi Chris,

What we have in Linux mainline is Zyxel NSA310 (Marvell 88f6281). The Zyxel
NSA310S (Marvell 88f6702) is actually a different box, which has not been
mainlined yet.

By the way, there are 3 variations of the Zyxel NSA310 box. This box has
some combination of: red USB Led, lm85 sensor, adt7476 sensor that make
them slighly different. The mainlined NSA310 DTS is for the one with adt7476
sensor.

Regards
bodhi


On Tue, May 8, 2018 at 3:34 AM, Chris Packham <judge.packham@gmail.com>
wrote:

> Import the dts files from Linux 4.17 and enable CONFIG_OF_CONTROL.
>
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> ---
>
>  arch/arm/dts/kirkwood-nsa310.dts         | 139 ++++++++++++++++++++
>  arch/arm/dts/kirkwood-nsa3x0-common.dtsi | 158 +++++++++++++++++++++++
>  configs/nsa310s_defconfig                |   3 +-
>  3 files changed, 299 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/dts/kirkwood-nsa310.dts
>  create mode 100644 arch/arm/dts/kirkwood-nsa3x0-common.dtsi
>
> diff --git a/arch/arm/dts/kirkwood-nsa310.dts b/arch/arm/dts/kirkwood-
> nsa310.dts
> new file mode 100644
> index 000000000000..9b861c2e76c5
> --- /dev/null
> +++ b/arch/arm/dts/kirkwood-nsa310.dts
> @@ -0,0 +1,139 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/dts-v1/;
> +
> +#include "kirkwood-nsa3x0-common.dtsi"
> +
> +/ {
> +       compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281",
> "marvell,kirkwood";
> +
> +       memory {
> +               device_type = "memory";
> +               reg = <0x00000000 0x10000000>;
> +       };
> +
> +       chosen {
> +               bootargs = "console=ttyS0,115200";
> +               stdout-path = &uart0;
> +       };
> +
> +       ocp at f1000000 {
> +               pinctrl: pin-controller at 10000 {
> +                       pinctrl-0 = <&pmx_unknown>;
> +                       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_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";
> +                       };
> +
> +               };
> +
> +               i2c at 11000 {
> +                       status = "okay";
> +
> +                       adt7476: adt7476a at 2e {
> +                               compatible = "adi,adt7476";
> +                               reg = <0x2e>;
> +                       };
> +               };
> +       };
> +
> +       gpio-leds {
> +               compatible = "gpio-leds";
> +               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";
> +
> +               green-sys {
> +                       label = "nsa310:green:sys";
> +                       gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
> +               };
> +               red-sys {
> +                       label = "nsa310:red:sys";
> +                       gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
> +               };
> +               green-hdd {
> +                       label = "nsa310:green:hdd";
> +                       gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
> +               };
> +               red-hdd {
> +                       label = "nsa310:red:hdd";
> +                       gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
> +               };
> +               green-esata {
> +                       label = "nsa310:green:esata";
> +                       gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
> +               };
> +               red-esata {
> +                       label = "nsa310:red:esata";
> +                       gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
> +               };
> +               green-usb {
> +                       label = "nsa310:green:usb";
> +                       gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
> +               };
> +               red-usb {
> +                       label = "nsa310:red:usb";
> +                       gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
> +               };
> +               green-copy {
> +                       label = "nsa310:green:copy";
> +                       gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
> +               };
> +               red-copy {
> +                       label = "nsa310:red:copy";
> +                       gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
> +               };
> +       };
> +};
> +
> +&pciec {
> +        status = "okay";
> +};
> +
> +&pcie0 {
> +       status = "okay";
> +};
> diff --git a/arch/arm/dts/kirkwood-nsa3x0-common.dtsi
> b/arch/arm/dts/kirkwood-nsa3x0-common.dtsi
> new file mode 100644
> index 000000000000..2c4037b07282
> --- /dev/null
> +++ b/arch/arm/dts/kirkwood-nsa3x0-common.dtsi
> @@ -0,0 +1,158 @@
> +// SPDX-License-Identifier: GPL-2.0
> +#include "kirkwood.dtsi"
> +#include "kirkwood-6281.dtsi"
> +
> +/ {
> +       model = "ZyXEL NSA310";
> +
> +       ocp at f1000000 {
> +               pinctrl: pin-controller at 10000 {
> +
> +                       pmx_usb_power: pmx-usb-power {
> +                               marvell,pins = "mpp21";
> +                               marvell,function = "gpio";
> +                       };
> +
> +                       pmx_pwr_off: pmx-pwr-off {
> +                               marvell,pins = "mpp48";
> +                               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_btn_power: pmx-btn-power {
> +                               marvell,pins = "mpp46";
> +                               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";
> +                       };
> +               };
> +
> +               serial at 12000 {
> +                       status = "ok";
> +               };
> +
> +               sata at 80000 {
> +                       status = "okay";
> +                       nr-ports = <2>;
> +               };
> +       };
> +
> +       gpio_poweroff {
> +               compatible = "gpio-poweroff";
> +               pinctrl-0 = <&pmx_pwr_off>;
> +               pinctrl-names = "default";
> +               gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
> +       };
> +
> +       gpio_keys {
> +               compatible = "gpio-keys";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
> +               pinctrl-names = "default";
> +
> +               power {
> +                       label = "Power Button";
> +                       linux,code = <KEY_POWER>;
> +                       gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
> +               };
> +               copy {
> +                       label = "Copy Button";
> +                       linux,code = <KEY_COPY>;
> +                       gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
> +               };
> +               reset {
> +                       label = "Reset Button";
> +                       linux,code = <KEY_RESTART>;
> +                       gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
> +               };
> +       };
> +
> +
> +       regulators {
> +               compatible = "simple-bus";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               pinctrl-0 = <&pmx_usb_power>;
> +               pinctrl-names = "default";
> +
> +               usb0_power: regulator at 1 {
> +                       compatible = "regulator-fixed";
> +                       reg = <1>;
> +                       regulator-name = "USB Power";
> +                       regulator-min-microvolt = <5000000>;
> +                       regulator-max-microvolt = <5000000>;
> +                       regulator-always-on;
> +                       regulator-boot-on;
> +                       gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
> +               };
> +       };
> +};
> +
> +&nand {
> +       status = "okay";
> +       chip-delay = <35>;
> +
> +       partition at 0 {
> +               label = "uboot";
> +               reg = <0x0000000 0x0100000>;
> +               read-only;
> +       };
> +       partition at 100000 {
> +               label = "uboot_env";
> +               reg = <0x0100000 0x0080000>;
> +       };
> +       partition at 180000 {
> +               label = "key_store";
> +               reg = <0x0180000 0x0080000>;
> +       };
> +       partition at 200000 {
> +               label = "info";
> +               reg = <0x0200000 0x0080000>;
> +       };
> +       partition at 280000 {
> +               label = "etc";
> +               reg = <0x0280000 0x0a00000>;
> +       };
> +       partition at c80000 {
> +               label = "kernel_1";
> +               reg = <0x0c80000 0x0a00000>;
> +       };
> +       partition at 1680000 {
> +               label = "rootfs1";
> +               reg = <0x1680000 0x2fc0000>;
> +       };
> +       partition at 4640000 {
> +               label = "kernel_2";
> +               reg = <0x4640000 0x0a00000>;
> +       };
> +       partition at 5040000 {
> +               label = "rootfs2";
> +               reg = <0x5040000 0x2fc0000>;
> +       };
> +};
> +
> +&pciec {
> +        status = "okay";
> +};
> +
> +&pcie0 {
> +       status = "okay";
> +};
> diff --git a/configs/nsa310s_defconfig b/configs/nsa310s_defconfig
> index 2529687414fa..d3ea933d378b 100644
> --- a/configs/nsa310s_defconfig
> +++ b/configs/nsa310s_defconfig
> @@ -2,6 +2,7 @@ CONFIG_ARM=y
>  CONFIG_KIRKWOOD=y
>  CONFIG_SYS_TEXT_BASE=0x600000
>  CONFIG_TARGET_NSA310S=y
> +CONFIG_DEFAULT_DEVICE_TREE="kirkwood-nsa310"
>  CONFIG_BOOTDELAY=3
>  # CONFIG_DISPLAY_BOARDINFO is not set
>  CONFIG_HUSH_PARSER=y
> @@ -21,6 +22,7 @@ CONFIG_CMD_JFFS2=y
>  CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xe0000@
> 0x0(uboot),0x20000 at 0xe0000(uboot_env),0x100000 at 0x100000(
> second_stage_uboot),- at 0x200000(root)"
>  CONFIG_CMD_UBI=y
>  CONFIG_ISO_PARTITION=y
> +CONFIG_OF_CONTROL=y
>  CONFIG_ENV_IS_IN_NAND=y
>  CONFIG_MVSATA_IDE=y
>  # CONFIG_MMC is not set
> @@ -29,4 +31,3 @@ CONFIG_USB=y
>  CONFIG_USB_EHCI_HCD=y
>  CONFIG_USB_STORAGE=y
>  CONFIG_LZMA=y
> -CONFIG_OF_LIBFDT=y
> --
> 2.17.0
>
>

  reply	other threads:[~2018-05-09 18:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 10:34 [U-Boot] [PATCH 00/12] kirkwood: device tree support Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 01/12] ARM: add devicetree files for kirkwood SoC Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 02/12] ARM: kirkwood: Add device-tree for dns325 Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 03/12] ARM: kirkwood: Add device-tree for dockstar Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 04/12] ARM: kirkwood: Add device-tree for goflexhome Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 05/12] ARM: kirkwood: Add device-tree for guruplug Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 06/12] ARM: kirkwood: Add device-tree for ib62x0 Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 07/12] ARM: kirkwood: Add device-tree for iconnect Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 08/12] ARM: kirkwood: Add device-tree for nas220 Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 09/12] ARM: kirkwood: Add device-tree for nsa310s Chris Packham
2018-05-09 18:27   ` bodhi bodhi [this message]
2018-05-10  0:51     ` Chris Packham
2018-05-15 12:09       ` Stefan Roese
     [not found]         ` <CAFOYHZBbO1ojzif9tbpbk_xj7ySsU2P11ftbKKz3xLGrzXh_FA@mail.gmail.com>
     [not found]           ` <c61d0b00-de94-7684-263e-3a46ae6d36d7@denx.de>
2018-05-16  8:23             ` Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 10/12] ARM: kirkwood: Add device-tree for openrd Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 11/12] ARM: kirkwood: Add device-tree for pogo_e02 Chris Packham
2018-05-08 10:34 ` [U-Boot] [PATCH 12/12] ARM: kirkwood: Add device-tree for sheevaplug Chris Packham
2018-05-16 12:03 ` [U-Boot] [PATCH 00/12] kirkwood: device tree support Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJaLiFxKhcyU4cqnB09hRHT4r3kmsqSMkstUDSvNQmzC0__Lag@mail.gmail.com \
    --to=mibodhi@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.