mvebu dt for 6.2 (part 1)

Fix assigned-addresses for every PCIe Root Port
 
 Align LED node names with dtschema
 
 Add a new kirkwood based board: Zyxel NSA310S
 
 Fix compatible string for gpios for Armada 38x and 39x
 
 Add interrupts for watchdog on Armada XP
 
 Turris Omnia (Armada 385 based):
  - Add switch port 6 node
  - Add ethernet aliases
 
 Switch to using gpiod API in pm-board code
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCY4QDYQAKCRALBhiOFHI7
 1WAEAJ9oLKs8LbLgO7CqgfY9j4g/bMWlMACfSxssqM2DqLd3EADd1y/JRRhwFaU=
 =iXv9
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmOHeb0ACgkQmmx57+YA
 GNlkixAAjvYjGVuQgStoWcrnT/fL8qatMCtXxvgNDT8Tq0zil5l7I7sLS7CIvc/j
 nkRdgtP62xBafYVd0BdP9vUWmW9lzTHgxitsxU5lE/J5+65xtnnBpfpd1cPg4r4k
 kv4D2UmIbiAQL7JrvVB3nL36K8tNN1PSN+pOTrJ9zccyjrMRGXgYsCF9zZRJSVyB
 Rn39xJM3gFawlFkSRJDAwcByck/8sGd7bhGCgZq5SeSQ1dDuy7w0PP06QoXa8oqe
 74EfcsDpP/2EbWKHjOSick4JDC6fiMM+i3G3h9MuZbpRemY2SxABHtaVdYh3G2yJ
 v8VRR5lZLK6A4iOYd2IDw27kHNh30kX6kHLhAYaXqBRc4ZTElSyo5V7xCWJIJ28T
 I6HunSsbBls1HXqkkMeow73VHoFe4ec1PNA5ToSrSzxqxUMvbAPza9Wflm+PktE7
 eKajK+IIsBXwI5JtXAnF+uAMVuhBcqDnQrrOzbedts2cA14Hm/LG0dmb8BE9bDJR
 npv1NpZBP/xg5l98FFgaq06He6gcY7vlT3VyGUj3N+VYDQq0LFA0WK+pV1Z+ORYS
 vyfHANvhJ03FgFX2396rfkzXT7j8fhmbaGi+WvdPa2e39c5BQ6a2aP/G6iCmWWpe
 7wg7iXE2npepBtj7PGOC9DX/xZ2nKjaR/fJMHc5wu46RnJO7JII=
 =Vk4K
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt

mvebu dt for 6.2 (part 1)

Fix assigned-addresses for every PCIe Root Port

Align LED node names with dtschema

Add a new kirkwood based board: Zyxel NSA310S

Fix compatible string for gpios for Armada 38x and 39x

Add interrupts for watchdog on Armada XP

Turris Omnia (Armada 385 based):
 - Add switch port 6 node
 - Add ethernet aliases

Switch to using gpiod API in pm-board code

* tag 'mvebu-dt-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
  ARM: dts: armada-xp: add interrupts for watchdog
  ARM: dts: armada: align LED node names with dtschema
  ARM: mvebu: switch to using gpiod API in pm-board code
  ARM: dts: armada-39x: Fix compatible string for gpios
  ARM: dts: armada-38x: Fix compatible string for gpios
  ARM: dts: turris-omnia: Add switch port 6 node
  ARM: dts: turris-omnia: Add ethernet aliases
  ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: kirkwood: Add Zyxel NSA310S board

Link: https://lore.kernel.org/r/87cz979adf.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2022-11-30 15:06:51 +01:00
commit c93a25d775
26 changed files with 339 additions and 71 deletions

View File

@ -355,6 +355,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
kirkwood-ns2mini.dtb \
kirkwood-nsa310.dtb \
kirkwood-nsa310a.dtb \
kirkwood-nsa310s.dtb \
kirkwood-nsa320.dtb \
kirkwood-nsa325.dtb \
kirkwood-openblocks_a6.dtb \

View File

@ -86,19 +86,19 @@ &sata_l_white_pin
pinctrl-names = "default";
sata-r-amber-pin {
led-sata-r-amber {
label = "dns327l:amber:sata-r";
gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
sata-l-amber-pin {
led-sata-l-amber {
label = "dns327l:amber:sata-l";
gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
backup-led-pin {
led-backup {
label = "dns327l:white:usb";
gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
default-state = "keep";

View File

@ -72,11 +72,11 @@ regulator@4 {
};
gpio-leds {
red-sata2 {
led-red-sata2 {
label = "dart:red:sata2";
gpios = <&pca9554 0 GPIO_ACTIVE_LOW>;
};
red-sata3 {
led-red-sata3 {
label = "dart:red:sata3";
gpios = <&pca9554 3 GPIO_ACTIVE_LOW>;
};

View File

@ -132,21 +132,21 @@ button-reset {
gpio-leds {
compatible = "gpio-leds";
white-power {
led-white-power {
label = "dart:white:power";
gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
red-power {
led-red-power {
label = "dart:red:power";
gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
};
red-sata0 {
led-red-sata0 {
label = "dart:red:sata0";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
red-sata1 {
led-red-sata1 {
label = "dart:red:sata1";
gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
};

View File

@ -107,7 +107,7 @@ button-usb {
gpio-leds {
compatible = "gpio-leds";
red-sata0 {
led-red-sata0 {
label = "cumulus:red:sata0";
gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
default-state = "off";

View File

@ -84,7 +84,7 @@ pcie0_intc: interrupt-controller {
pcie2: pcie@2,0 {
device_type = "pci";
assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
assigned-addresses = <0x82001000 0 0x80000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;

View File

@ -592,7 +592,7 @@ pcie0_intc: interrupt-controller {
pcie1: pcie@2,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;

View File

@ -89,7 +89,7 @@ pcie1_intc: interrupt-controller {
/* x1 port */
pcie@2,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -118,7 +118,7 @@ pcie2_intc: interrupt-controller {
/* x1 port */
pcie@3,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
reg = <0x1800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;

View File

@ -62,11 +62,11 @@ wps_amber@9 {
};
&gpio_leds {
power {
led-power {
label = "caiman:white:power";
};
sata {
led-sata {
label = "caiman:white:sata";
};
};

View File

@ -62,11 +62,11 @@ wps_amber@9 {
};
&gpio_leds {
power {
led-power {
label = "cobra:white:power";
};
sata {
led-sata {
label = "cobra:white:sata";
};
};

View File

@ -54,22 +54,22 @@ wps_amber@9 {
};
&gpio_leds {
power {
led-power {
gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
label = "rango:white:power";
};
sata {
led-sata {
gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
label = "rango:white:sata";
};
wlan_2g {
led-wlan_2g {
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
label = "rango:white:wlan_2g";
};
wlan_5g {
led-wlan_5g {
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
label = "rango:white:wlan_5g";
};

View File

@ -62,11 +62,11 @@ wps_amber@9 {
};
&gpio_leds {
power {
led-power {
label = "shelby:white:power";
};
sata {
led-sata {
label = "shelby:white:sata";
};
};

View File

@ -71,12 +71,12 @@ gpio_leds: gpio-leds {
pinctrl-0 = <&gpio_leds_pins>;
pinctrl-names = "default";
power {
led-power {
gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
sata {
led-sata {
gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
default-state = "off";
linux,default-trigger = "disk-activity";

View File

@ -149,7 +149,7 @@ gpio-leds {
* sata0, and accesses to SATA disk 0 make it blink so it
* doesn't need to be declared here.
*/
orange {
led-orange {
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
label = "ds116:orange:disk";
default-state = "off";

View File

@ -23,6 +23,12 @@ chosen {
stdout-path = &uart0;
};
aliases {
ethernet0 = &eth0;
ethernet1 = &eth1;
ethernet2 = &eth2;
};
memory {
device_type = "memory";
reg = <0x00000000 0x40000000>; /* 1024 MB */
@ -483,7 +489,17 @@ fixed-link {
};
};
/* port 6 is connected to eth0 */
ports@6 {
reg = <6>;
label = "cpu";
ethernet = <&eth0>;
phy-mode = "rgmii-id";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};
};

View File

@ -93,7 +93,7 @@ pcie1_intc: interrupt-controller {
/* x1 port */
pcie2: pcie@2,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -121,7 +121,7 @@ pcie2_intc: interrupt-controller {
/* x1 port */
pcie3: pcie@3,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
reg = <0x1800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -152,7 +152,7 @@ pcie3_intc: interrupt-controller {
*/
pcie4: pcie@4,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
assigned-addresses = <0x82002000 0 0x48000 0 0x2000>;
reg = <0x2000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;

View File

@ -304,7 +304,7 @@ spdif_pins: spdif-pins {
};
gpio0: gpio@18100 {
compatible = "marvell,armada-370-gpio",
compatible = "marvell,armadaxp-gpio",
"marvell,orion-gpio";
reg = <0x18100 0x40>, <0x181c0 0x08>;
reg-names = "gpio", "pwm";
@ -323,7 +323,7 @@ gpio0: gpio@18100 {
};
gpio1: gpio@18140 {
compatible = "marvell,armada-370-gpio",
compatible = "marvell,armadaxp-gpio",
"marvell,orion-gpio";
reg = <0x18140 0x40>, <0x181c8 0x08>;
reg-names = "gpio", "pwm";

View File

@ -213,7 +213,7 @@ nand_pins: nand-pins {
};
gpio0: gpio@18100 {
compatible = "marvell,orion-gpio";
compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio";
reg = <0x18100 0x40>;
ngpios = <32>;
gpio-controller;
@ -227,7 +227,7 @@ gpio0: gpio@18100 {
};
gpio1: gpio@18140 {
compatible = "marvell,orion-gpio";
compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio";
reg = <0x18140 0x40>;
ngpios = <28>;
gpio-controller;
@ -463,7 +463,7 @@ pcie1_intc: interrupt-controller {
/* x1 port */
pcie@2,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -492,7 +492,7 @@ pcie2_intc: interrupt-controller {
/* x1 port */
pcie@3,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
reg = <0x1800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -524,7 +524,7 @@ pcie3_intc: interrupt-controller {
*/
pcie@4,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
assigned-addresses = <0x82002000 0 0x48000 0 0x2000>;
reg = <0x2000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;

View File

@ -296,6 +296,7 @@ &watchdog {
compatible = "marvell,armada-xp-wdt";
clocks = <&coreclk 2>, <&refclk>;
clock-names = "nbclk", "fixed";
interrupts = <93>, <38>;
};
&cpurst {

View File

@ -195,7 +195,7 @@ gpio-leds {
pinctrl-0 = <&power_led_pin>;
pinctrl-names = "default";
power {
led-power {
label = "mamba:white:power";
gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
default-state = "on";

View File

@ -107,7 +107,7 @@ pcie1_intc: interrupt-controller {
pcie2: pcie@2,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -135,7 +135,7 @@ pcie2_intc: interrupt-controller {
pcie3: pcie@3,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
reg = <0x1800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -163,7 +163,7 @@ pcie3_intc: interrupt-controller {
pcie4: pcie@4,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
reg = <0x2000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -191,7 +191,7 @@ pcie4_intc: interrupt-controller {
pcie5: pcie@5,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
reg = <0x2800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;

View File

@ -122,7 +122,7 @@ pcie1_intc: interrupt-controller {
pcie2: pcie@2,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -150,7 +150,7 @@ pcie2_intc: interrupt-controller {
pcie3: pcie@3,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
reg = <0x1800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -178,7 +178,7 @@ pcie3_intc: interrupt-controller {
pcie4: pcie@4,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
reg = <0x2000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -206,7 +206,7 @@ pcie4_intc: interrupt-controller {
pcie5: pcie@5,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
reg = <0x2800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -234,7 +234,7 @@ pcie5_intc: interrupt-controller {
pcie6: pcie@6,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
reg = <0x3000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -262,7 +262,7 @@ pcie6_intc: interrupt-controller {
pcie7: pcie@7,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
reg = <0x3800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -290,7 +290,7 @@ pcie7_intc: interrupt-controller {
pcie8: pcie@8,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
reg = <0x4000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
@ -318,7 +318,7 @@ pcie8_intc: interrupt-controller {
pcie9: pcie@9,0 {
device_type = "pci";
assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
reg = <0x4800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;

View File

@ -260,6 +260,7 @@ &watchdog {
compatible = "marvell,armada-xp-wdt";
clocks = <&coreclk 2>, <&refclk>;
clock-names = "nbclk", "fixed";
interrupts = <93>, <38>;
};
&cpurst {

View File

@ -139,7 +139,7 @@ pcie0_intc: interrupt-controller {
pcie1: pcie@2 {
device_type = "pci";
status = "disabled";
assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
assigned-addresses = <0x82001000 0 0x80000 0 0x2000>;
reg = <0x1000 0 0 0 0>;
clocks = <&gate_clk 5>;
marvell,pcie-port = <1>;

View File

@ -0,0 +1,259 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* ZyXEL NSA310S Board Description
* Copyright 2020-2022 Pawel Dembicki <paweldembicki@gmail.com>
* Copyright (c) 2015-2021, Tony Dinh <mibodhi@gmail.com>
* Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk>
* Based upon the board setup file created by Peter Schildmann
*/
/dts-v1/;
#include "kirkwood.dtsi"
#include "kirkwood-6281.dtsi"
#include <dt-bindings/leds/common.h>
/ {
model = "ZyXEL NSA310S";
compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
memory {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
chosen {
bootargs = "console=ttyS0,115200n8 earlyprintk";
stdout-path = &uart0;
};
gpio_poweroff {
compatible = "gpio-poweroff";
pinctrl-0 = <&pmx_pwr_off>;
pinctrl-names = "default";
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
};
keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&pmx_buttons>;
pinctrl-names = "default";
power {
label = "Power Button";
linux,code = <KEY_POWER>;
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
};
copy {
label = "Copy Button";
linux,code = <KEY_COPY>;
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
};
reset {
label = "Reset Button";
linux,code = <KEY_RESTART>;
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&pmx_leds>;
pinctrl-names = "default";
led-1 {
function = LED_FUNCTION_DISK_ERR;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
led-2 {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "usb-host";
};
led-3 {
function = LED_FUNCTION_DISK;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "ata1";
};
led-4 {
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
};
led-5 {
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
};
led-6 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "default-on";
};
led-7 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
};
};
usb0_power: regulator@1 {
compatible = "regulator-fixed";
regulator-name = "USB Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
};
sata1_power: regulator@2 {
compatible = "regulator-fixed";
regulator-name = "SATA1 Power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
};
thermal-zones {
disk-thermal {
polling-delay = <20000>;
polling-delay-passive = <2000>;
thermal-sensors = <&hdd_temp>;
trips {
disk_alert: disk-alert {
temperature = <40000>;
hysteresis = <5000>;
type = "active";
};
disk_crit: disk-crit {
temperature = <60000>;
hysteresis = <2000>;
type = "critical";
};
};
};
};
};
&eth0 {
status = "okay";
ethernet0-port@0 {
phy-handle = <&ethphy0>;
};
};
&i2c0 {
status = "okay";
rtc@68 {
compatible = "htk,ht1382";
reg = <0x68>;
};
};
&mdio {
status = "okay";
ethphy0: ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii-id";
marvell,reg-init = <0x1 0x16 0x0 0x3>,
<0x1 0x10 0x0 0x1017>,
<0x1 0x11 0x0 0x4408>,
<0x1 0x16 0x0 0x0>;
};
};
&nand {
status = "okay";
chip-delay = <35>;
partition@0 {
label = "uboot";
reg = <0x0000000 0x00c0000>;
read-only;
};
partition@c0000 {
label = "uboot_env";
reg = <0x00c0000 0x0080000>;
};
partition@140000 {
label = "ubi";
reg = <0x0140000 0x7ec0000>;
};
};
&pciec {
status = "okay";
};
&pcie0 {
status = "okay";
};
&pinctrl {
pinctrl-names = "default";
pmx_buttons: pmx-buttons {
marvell,pins = "mpp24", "mpp25", "mpp26";
marvell,function = "gpio";
};
pmx_leds: pmx-leds {
marvell,pins = "mpp13", "mpp15", "mpp16", "mpp22", "mpp23",
"mpp28", "mpp29";
marvell,function = "gpio";
};
pmx_power: pmx-power {
marvell,pins = "mpp21", "mpp33";
marvell,function = "gpio";
};
pmx_pwr_off: pmx-pwr-off {
marvell,pins = "mpp27";
marvell,function = "gpio";
};
};
&rtc {
status = "disabled";
};
&sata {
status = "okay";
nr-ports = <1>;
#address-cells = <1>;
#size-cells = <0>;
hdd_temp: sata-port@0 {
reg = <0>;
#thermal-sensor-cells = <0>;
};
};
&uart0 {
status = "okay";
};

View File

@ -8,19 +8,19 @@
*/
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_gpio.h>
#include <linux/slab.h>
#include "common.h"
#define ARMADA_PIC_NR_GPIOS 3
static void __iomem *gpio_ctrl;
static int pic_gpios[ARMADA_PIC_NR_GPIOS];
static struct gpio_desc *pic_gpios[ARMADA_PIC_NR_GPIOS];
static int pic_raw_gpios[ARMADA_PIC_NR_GPIOS];
static void mvebu_armada_pm_enter(void __iomem *sdram_reg, u32 srcmd)
@ -90,27 +90,17 @@ static int __init mvebu_armada_pm_init(void)
char *name;
struct of_phandle_args args;
pic_gpios[i] = of_get_named_gpio(np, "ctrl-gpios", i);
if (pic_gpios[i] < 0) {
ret = -ENODEV;
goto out;
}
name = kasprintf(GFP_KERNEL, "pic-pin%d", i);
if (!name) {
ret = -ENOMEM;
goto out;
}
ret = gpio_request(pic_gpios[i], name);
if (ret < 0) {
kfree(name);
goto out;
}
ret = gpio_direction_output(pic_gpios[i], 0);
if (ret < 0) {
gpio_free(pic_gpios[i]);
pic_gpios[i] = fwnode_gpiod_get_index(of_fwnode_handle(np),
"ctrl", i, GPIOD_OUT_HIGH,
name);
ret = PTR_ERR_OR_ZERO(pic_gpios[i]);
if (ret) {
kfree(name);
goto out;
}
@ -118,7 +108,7 @@ static int __init mvebu_armada_pm_init(void)
ret = of_parse_phandle_with_fixed_args(np, "ctrl-gpios", 2,
i, &args);
if (ret < 0) {
gpio_free(pic_gpios[i]);
gpiod_put(pic_gpios[i]);
kfree(name);
goto out;
}