9
0
Fork 0
barebox/arch/arm/dts/am335x-gsmk-owhw.dts

345 lines
7.4 KiB
Plaintext

/*
* Copyright (C) 2015-2016 Harald Welte <laforge@gnumonks.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
#include <dt-bindings/input/input.h>
#include "am33xx.dtsi"
#include "am335x-phytec-phycore-som.dtsi"
/ {
model = "GSMK OWHW v2";
compatible = "gsmk,owhw", "phytec,phycore-am335x-som", "phytec,am335x-som", "ti,am33xx";
buttons: user_buttons {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&user_buttons_pins>;
button@0 {
label = "rest";
linux,code = <KEY_HOME>; /* KEY_F6 */
gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
};
};
leds: user_leds {
pinctrl-names = "default";
pinctrl-0 = <&user_leds_pins>;
compatible = "gpio-leds";
led@0 {
label = "owhw:amber:status";
gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat";
default-state = "off";
};
};
state: state {
compatible = "barebox,state";
magic = <0x6c15c8df>;
backend-type = "raw";
backend = &eeprom_baseboard, "partname:state";
bootstate {
system0 {
#address-cells = <1>;
#size-cells = <1>;
remaining_attempts {
reg = <0x0 0x1>;
type = "uint8";
};
priority {
reg = <0x1 0x1>;
type = "uint8";
};
ok {
reg = <0x2 0x1>;
type = "uint8";
};
};
system1 {
#address-cells = <1>;
#size-cells = <1>;
remaining_attempts {
reg = <0x3 0x1>;
type = "uint8";
};
priority {
reg = <0x4 0x1>;
type = "uint8";
};
ok {
reg = <0x5 0x1>;
type = "uint8";
};
};
rescue {
#address-cells = <1>;
#size-cells = <1>;
remaining_attempts {
reg = <0x6 0x1>;
type = "uint8";
};
priority {
reg = <0x7 0x1>;
type = "uint8";
};
ok {
reg = <0x8 0x1>;
type = "uint8";
};
};
};
};
bootstate: bootstate {
compatible = "barebox,bootstate";
backend-type = "state";
backend = <&state>;
system0 {
default_attempts = <3>;
};
system1 {
default_attempts = <3>;
};
rescue {
default_attempts = <3>;
};
};
i2c_gpio {
compatible = "i2c-gpio";
gpios = <&gpio1 31 GPIO_ACTIVE_HIGH /* sda */
&gpio1 16 GPIO_ACTIVE_HIGH /* scl */
>;
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us = <20>; /* ~10 kHz */
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2c_gpio_pins>;
status = "okay";
ltc4274@20 {
compatible = "ltc4275";
reg = <0x20>;
};
};
switch_mdio {
compatible = "virtual,mdio-gpio";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&switch_mdio_pins>;
/* order: MDC, MDIO */
gpios = <&gpio1 19
&gpio1 21>;
status = "okay";
};
spi_gpio {
compatible = "spi-gpio";
pinctrl-names = "default";
pinctrl-0 = <&spi1_gpio_pins>;
status = "okay";
gpio-sck = <&gpio3 14 0>;
gpio-mosi = <&gpio3 16 0>;
gpio-miso = <&gpio3 15 0>;
cs-gpios = <&gpio3 21 0>;
num-chipselects = <1>;
#address-cells = <1>;
#size-cells = <0>;
eeprom_baseboard: m95m02@0 {
compatible = "st,m95m02", "atmel,at25";
size = <262144>;
pagesize = <256>;
address-width = <24>;
spi-max-frequency = <5000000>;
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
status = "okay";
partition@0 {
label = "state";
reg = <0xc0 0x40>; /* last 0x40 bytes for eeprom */
};
};
};
};
&nand {
partition@5 {
label = "bareboxenv";
reg = <0x100000 0x20000>;
};
partition@6 {
label = "root";
reg = <0x120000 0x0>;
};
};
&i2c0_pins {
pinctrl-single,pins = <
0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
>;
};
&i2c1 {
status = "okay";
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
};
&am33xx_pinmux {
pinctrl-names = "default";
pinctrl-0 = <&hub_pins &mdm_pins &simtrace_pins &pse_pins &switch_pins>;
i2c1_pins: pinmux_i2c1_pins {
pinctrl-single,pins = <
0x168 (PIN_INPUT_PULLUP | MUX_MODE3) /* uart0_ctsn.i2c1_sda */
0x16c (PIN_INPUT_PULLUP | MUX_MODE3) /* uart0_rtsn.i2c1_scl */
>;
};
mdm_pins: pinmux_mdm_pins {
pinctrl-single,pins = <
/* MDM1_RST */
0x28 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (T11) gpmc_ad10.gpio0[26] */
/* MDM1_ON */
0x6c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (V17) gpmc_a11.gpio1[27] */
/* MDM_LDO_EN */
0x68 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* (T16) gpmc_a10.gpio1[26] */
/* MDM2_RST */
0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (T15) gpmc_a7.gpio1[23] */
/* MDM2_ON */
0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (U14) gpmc_a2.gpio1[18] */
>;
};
acc_pins: pinmux_acc_pins {
pinctrl-single,pins = <
/* ACC_INT1 */
0x1e8 (PIN_INPUT_PULLUP | MUX_MODE7) /* (B14) EMU1.gpio3[8] */
>;
};
hub_pins: pinmux_hub_pins {
pinctrl-single,pins = <
/* !HUB_RESET */
0x80 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* (U9) gpmc_csn1.gpio1[30] */
>;
};
simtrace_pins: pinmux_simtrace_pins {
pinctrl-single,pins = <
/* _SIMTRACE_ERASE: 3_17 */
0x19c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (C12) mcasp0_ahclkr.gpio3[17] */
/* _SIMTRACE_BOOTLOADER: 3_19 */
0x1a4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (C13) mcasp0_fsr.gpio3[19] */
/* _SIMTRACE_RESET: 3_18 */
0x1a0 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (B12) mcasp0_aclkr.gpio3[18] */
/* !CONNECT_ST_USIM1: 0_27 */
0x2c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (U12) gpmc_ad11.gpio0[27] */
/* !CONNECT_ST_USIM2: 0_23 */
0x24 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (T10) gpmc_ad9.gpio0[23] */
>;
};
pse_pins: pinmux_pse_pins {
pinctrl-single,pins = <
/* !PSE_INT: 1_20 */
0x50 (PIN_INPUT | MUX_MODE7) /* (R14) gpmc_a4.gpio1[20] */
>;
};
switch_pins: pinmux_pse_pins {
pinctrl-single,pins = <
/* SWITCH_RESET: 1_24 */
0x60 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (V16) gpmc_a8.gpio1[24] */
>;
};
user_leds_pins: pinmux_user_leds {
pinctrl-single,pins = <
/* STATUS_LED: 1_22 */
0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* (V15) gpmc_a6.gpio1[22] */
>;
};
user_buttons_pins: pinmux_user_buttons {
pinctrl-single,pins = <
/* BUTTON: 1_25 */
0x64 (PIN_INPUT_PULLUP | MUX_MODE7) /* (U16) gpmc_a9.gpio1[25] */
>;
};
i2c_gpio_pins: pinmux_i2c_gpio {
pinctrl-single,pins = <
/* I2C_S_SCL: 1_16 */
0x40 (PIN_OUTPUT_PULLUP | PIN_INPUT_PULLUP | MUX_MODE7) /* (R13) gpmc_a0.gpio1[16] */
/* I2C_S_SDA: 1_31 */
0x84 (PIN_OUTPUT_PULLUP | PIN_INPUT_PULLUP | MUX_MODE7) /* (V9) gpmc_csn2.gpio1[31] */
>;
};
spi1_gpio_pins: pinmux_spi1_gpio {
pinctrl-single,pins = <
/* EEPROM_WP */
0x1a8 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* (D13) mcasp0_axr1.gpio3_20 */
0x190 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (A13) mcasp0_aclkx.spi1_sclk */
0x194 (PIN_INPUT_PULLUP | MUX_MODE7) /* (B13) mcasp0_fsx.spi1_d0 */
0x198 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* (D12) mcasp0_axr0.spi1_d1 */
0x1AC (PIN_OUTPUT_PULLUP | MUX_MODE7) /* (A14) mcasp0_ahclkx.gpio3_21 */
>;
};
switch_mdio_pins: pinmux_mdio_gpio {
pinctrl-single,pins = <
/* ETH_MDC: 1_19 */
0x4c (PIN_OUTPUT_PULLUP | MUX_MODE7) /* (T14) gpmc_a3.gpio1[19] */
/* ETH_MDIO: 1_21 */
0x54 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* (V15) gpmc_a5.gpio1[21] */
>;
};
};
&usb0 {
dr_mode = "peripheral";
status = "okay";
};
&usb0_phy {
status = "okay";
};
&spi0 {
status = "okay";
};