0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2019 Linaro Ltd.
0004 * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
0005 */
0006
0007 /dts-v1/;
0008
0009 #include "bm1880.dtsi"
0010
0011 /*
0012 * GPIO name legend: proper name = the GPIO line is used as GPIO
0013 * NC = not connected (pin out but not routed from the chip to
0014 * anything the board)
0015 * "[PER]" = pin is muxed for [peripheral] (not GPIO)
0016 * LSEC = Low Speed External Connector
0017 * HSEC = High Speed External Connector
0018 *
0019 * Line names are taken from the schematic "sophon-edge-schematics"
0020 * version, 1.0210.
0021 *
0022 * For the lines routed to the external connectors the
0023 * lines are named after the 96Boards CE Specification 1.0,
0024 * Appendix "Expansion Connector Signal Description".
0025 *
0026 * When the 96Board naming of a line and the schematic name of
0027 * the same line are in conflict, the 96Board specification
0028 * takes precedence. This is only for the informational
0029 * lines i.e. "[FOO]", the GPIO named lines "GPIO-A" thru "GPIO-L"
0030 * are the only ones actually used for GPIO.
0031 */
0032
0033 / {
0034 compatible = "bitmain,sophon-edge", "bitmain,bm1880";
0035 model = "Sophon Edge";
0036
0037 aliases {
0038 serial0 = &uart0;
0039 serial1 = &uart2;
0040 serial2 = &uart1;
0041 };
0042
0043 chosen {
0044 stdout-path = "serial0:115200n8";
0045 };
0046
0047 memory@0 {
0048 device_type = "memory";
0049 reg = <0x1 0x00000000 0x0 0x40000000>; // 1GB
0050 };
0051
0052 soc {
0053 gpio0: gpio@50027000 {
0054 porta: gpio-controller@0 {
0055 gpio-line-names =
0056 "GPIO-A", /* GPIO0, LSEC pin 23 */
0057 "GPIO-C", /* GPIO1, LSEC pin 25 */
0058 "[GPIO2_PHY0_RST]", /* GPIO2 */
0059 "GPIO-E", /* GPIO3, LSEC pin 27 */
0060 "[USB_DET]", /* GPIO4 */
0061 "[EN_P5V]", /* GPIO5 */
0062 "[VDDIO_MS1_SEL]", /* GPIO6 */
0063 "GPIO-G", /* GPIO7, LSEC pin 29 */
0064 "[BM_TUSB_RST_L]", /* GPIO8 */
0065 "[EN_P5V_USBHUB]", /* GPIO9 */
0066 "NC",
0067 "LED_WIFI", /* GPIO11 */
0068 "LED_BT", /* GPIO12 */
0069 "[BM_BLM8221_EN_L]", /* GPIO13 */
0070 "NC", /* GPIO14 */
0071 "NC", /* GPIO15 */
0072 "NC", /* GPIO16 */
0073 "NC", /* GPIO17 */
0074 "NC", /* GPIO18 */
0075 "NC", /* GPIO19 */
0076 "NC", /* GPIO20 */
0077 "NC", /* GPIO21 */
0078 "NC", /* GPIO22 */
0079 "NC", /* GPIO23 */
0080 "NC", /* GPIO24 */
0081 "NC", /* GPIO25 */
0082 "NC", /* GPIO26 */
0083 "NC", /* GPIO27 */
0084 "NC", /* GPIO28 */
0085 "NC", /* GPIO29 */
0086 "NC", /* GPIO30 */
0087 "NC"; /* GPIO31 */
0088 };
0089 };
0090
0091 gpio1: gpio@50027400 {
0092 portb: gpio-controller@0 {
0093 gpio-line-names =
0094 "NC", /* GPIO32 */
0095 "NC", /* GPIO33 */
0096 "[I2C0_SDA]", /* GPIO34, LSEC pin 17 */
0097 "[I2C0_SCL]", /* GPIO35, LSEC pin 15 */
0098 "[JTAG0_TDO]", /* GPIO36 */
0099 "[JTAG0_TCK]", /* GPIO37 */
0100 "[JTAG0_TDI]", /* GPIO38 */
0101 "[JTAG0_TMS]", /* GPIO39 */
0102 "[JTAG0_TRST_X]", /* GPIO40 */
0103 "[JTAG1_TDO]", /* GPIO41 */
0104 "[JTAG1_TCK]", /* GPIO42 */
0105 "[JTAG1_TDI]", /* GPIO43 */
0106 "[CPU_TX]", /* GPIO44 */
0107 "[CPU_RX]", /* GPIO45 */
0108 "[UART1_TXD]", /* GPIO46 */
0109 "[UART1_RXD]", /* GPIO47 */
0110 "[UART0_TXD]", /* GPIO48 */
0111 "[UART0_RXD]", /* GPIO49 */
0112 "GPIO-I", /* GPIO50, LSEC pin 31 */
0113 "GPIO-K", /* GPIO51, LSEC pin 33 */
0114 "USER_LED2", /* GPIO52 */
0115 "USER_LED1", /* GPIO53 */
0116 "[UART0_RTS]", /* GPIO54 */
0117 "[UART0_CTS]", /* GPIO55 */
0118 "USER_LED4", /* GPIO56, JTAG1_TRST_X */
0119 "USER_LED3", /* GPIO57, JTAG1_TMS */
0120 "[I2S0_SCLK]", /* GPIO58 */
0121 "[I2S0_FS]", /* GPIO59 */
0122 "[I2S0_SDI]", /* GPIO60 */
0123 "[I2S0_SDO]", /* GPIO61 */
0124 "GPIO-B", /* GPIO62, LSEC pin 24 */
0125 "GPIO-F"; /* GPIO63, I2S1_SCLK, LSEC pin 28 */
0126 };
0127 };
0128
0129 gpio2: gpio@50027800 {
0130 portc: gpio-controller@0 {
0131 gpio-line-names =
0132 "GPIO-D", /* GPIO64, I2S1_FS, LSEC pin 26 */
0133 "GPIO-J", /* GPIO65, I2S1_SDI, LSEC pin 32 */
0134 "GPIO-H", /* GPIO66, I2S1_SDO, LSEC pin 30 */
0135 "GPIO-L", /* GPIO67, LSEC pin 34 */
0136 "[SPI0_CS]", /* GPIO68, SPI1_CS, LSEC pin 12 */
0137 "[SPI0_DIN]", /* GPIO69, SPI1_SDI, LSEC pin 10 */
0138 "[SPI0_DOUT]", /* GPIO70, SPI1_SDO, LSEC pin 14 */
0139 "[SPI0_SCLK]"; /* GPIO71, SPI1_SCK, LSEC pin 8 */
0140 };
0141 };
0142 };
0143 };
0144
0145 &pinctrl {
0146 pinctrl_uart0_default: pinctrl-uart0-default {
0147 pinmux {
0148 groups = "uart0_grp";
0149 function = "uart0";
0150 };
0151 };
0152
0153 pinctrl_uart1_default: pinctrl-uart1-default {
0154 pinmux {
0155 groups = "uart1_grp";
0156 function = "uart1";
0157 };
0158 };
0159
0160 pinctrl_uart2_default: pinctrl-uart2-default {
0161 pinmux {
0162 groups = "uart2_grp";
0163 function = "uart2";
0164 };
0165 };
0166 };
0167
0168 &uart0 {
0169 status = "okay";
0170 pinctrl-names = "default";
0171 pinctrl-0 = <&pinctrl_uart0_default>;
0172 };
0173
0174 &uart1 {
0175 status = "okay";
0176 pinctrl-names = "default";
0177 pinctrl-0 = <&pinctrl_uart1_default>;
0178 };
0179
0180 &uart2 {
0181 status = "okay";
0182 pinctrl-names = "default";
0183 pinctrl-0 = <&pinctrl_uart2_default>;
0184 };