mamin27 / H616-mangopi

DTS file for setting MQ-Quad / MCore-H616 board
MIT License
16 stars 2 forks source link

I2S (i2s0) working at GPIO #1

Open VGCH opened 1 year ago

VGCH commented 1 year ago

I can’t get the i2s interface to work. When I run cat /sys/kernel/debug/pinctrl/300b000.pinctrl/pinmux-pins I don’t see the pins defined for i2s.

root@debian:~# cat /sys/kernel/debug/pinctrl/300b000.pinctrl/pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner|gpio_owner (strict) hog? pin 0 (PA0): device 5030000.ethernet function emac1 group PA0 pin 1 (PA1): device 5030000.ethernet function emac1 group PA1 pin 2 (PA2): device 5030000.ethernet function emac1 group PA2 pin 3 (PA3): device 5030000.ethernet function emac1 group PA3 pin 4 (PA4): device 5030000.ethernet function emac1 group PA4 pin 5 (PA5): device 5030000.ethernet function emac1 group PA5 pin 6 (PA6): device 5030000.ethernet function emac1 group PA6 pin 7 (PA7): device 5030000.ethernet function emac1 group PA7 pin 8 (PA8): device 5030000.ethernet function emac1 group PA8 pin 9 (PA9): device 5030000.ethernet function emac1 group PA9 pin 10 (PA10): UNCLAIMED pin 11 (PA11): UNCLAIMED pin 12 (PA12): UNCLAIMED pin 64 (PC0): UNCLAIMED pin 65 (PC1): UNCLAIMED pin 66 (PC2): UNCLAIMED pin 67 (PC3): UNCLAIMED pin 68 (PC4): UNCLAIMED pin 69 (PC5): UNCLAIMED pin 70 (PC6): UNCLAIMED pin 71 (PC7): UNCLAIMED pin 72 (PC8): UNCLAIMED pin 73 (PC9): UNCLAIMED pin 74 (PC10): GPIO 300b000.pinctrl:74 pin 75 (PC11): UNCLAIMED pin 76 (PC12): GPIO 300b000.pinctrl:76 pin 77 (PC13): UNCLAIMED pin 78 (PC14): UNCLAIMED pin 79 (PC15): UNCLAIMED pin 80 (PC16): UNCLAIMED pin 160 (PF0): device 4020000.mmc function mmc0 group PF0 pin 161 (PF1): device 4020000.mmc function mmc0 group PF1 pin 162 (PF2): device 4020000.mmc function mmc0 group PF2 pin 163 (PF3): device 4020000.mmc function mmc0 group PF3 pin 164 (PF4): device 4020000.mmc function mmc0 group PF4 pin 165 (PF5): device 4020000.mmc function mmc0 group PF5 pin 166 (PF6): UNCLAIMED pin 192 (PG0): device 4021000.mmc function mmc1 group PG0 pin 193 (PG1): device 4021000.mmc function mmc1 group PG1 pin 194 (PG2): device 4021000.mmc function mmc1 group PG2 pin 195 (PG3): device 4021000.mmc function mmc1 group PG3 pin 196 (PG4): device 4021000.mmc function mmc1 group PG4 pin 197 (PG5): device 4021000.mmc function mmc1 group PG5 pin 198 (PG6): device 5000400.serial function uart1 group PG6 pin 199 (PG7): device 5000400.serial function uart1 group PG7 pin 200 (PG8): device 5000400.serial function uart1 group PG8 pin 201 (PG9): device 5000400.serial function uart1 group PG9 pin 202 (PG10): UNCLAIMED pin 203 (PG11): UNCLAIMED pin 204 (PG12): UNCLAIMED pin 205 (PG13): UNCLAIMED pin 206 (PG14): UNCLAIMED pin 207 (PG15): GPIO 300b000.pinctrl:207 pin 208 (PG16): UNCLAIMED pin 209 (PG17): UNCLAIMED pin 210 (PG18): GPIO 300b000.pinctrl:210 pin 211 (PG19): UNCLAIMED pin 224 (PH0): device 5000000.serial function uart0 group PH0 pin 225 (PH1): device 5000000.serial function uart0 group PH1 pin 226 (PH2): UNCLAIMED pin 227 (PH3): UNCLAIMED pin 228 (PH4): UNCLAIMED pin 229 (PH5): GPIO 300b000.pinctrl:229 pin 230 (PH6): UNCLAIMED pin 231 (PH7): UNCLAIMED pin 232 (PH8): UNCLAIMED pin 233 (PH9): UNCLAIMED pin 234 (PH10): device 7040000.ir function ir_rx group PH10 pin 256 (PI0): UNCLAIMED pin 257 (PI1): UNCLAIMED pin 258 (PI2): UNCLAIMED pin 259 (PI3): UNCLAIMED pin 260 (PI4): UNCLAIMED pin 261 (PI5): UNCLAIMED pin 262 (PI6): UNCLAIMED pin 263 (PI7): device 5002400.i2c function i2c1 group PI7 pin 264 (PI8): device 5002400.i2c function i2c1 group PI8 pin 265 (PI9): device 5002800.i2c function i2c2 group PI9 pin 266 (PI10): device 5002800.i2c function i2c2 group PI10 pin 267 (PI11): UNCLAIMED pin 268 (PI12): UNCLAIMED pin 269 (PI13): UNCLAIMED pin 270 (PI14): UNCLAIMED pin 271 (PI15): UNCLAIMED pin 272 (PI16): UNCLAIMED

How to define i2s interface? Thanks.

mamin27 commented 1 year ago

Please try to run these commands and send me. I would like to know source of your linux image.

comet@mangopi:~$ uname -a
Linux mangopi 5.16.17-sun50iw9 #3.0.0 SMP Wed Jan 11 20:38:13 CET 2023 aarch64 GNU/Linux
comet@mangopi:~$ sudo apt list | grep gpio
[sudo] password for comet:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

gpiod/stable,now 1.6.2-1 arm64 [installed]
gpiod/stable 1.6.2-1 armhf
libgpiod-dev/stable 1.6.2-1 arm64
libgpiod-dev/stable 1.6.2-1 armhf
libgpiod-doc/stable,stable 1.6.2-1 all
libgpiod2/stable,now 1.6.2-1 arm64 [installed,automatic]
libgpiod2/stable 1.6.2-1 armhf
libpigpiod-if-dev/stable 1.78-1 arm64
libpigpiod-if-dev/stable 1.78-1 armhf
libpigpiod-if1/stable 1.78-1 arm64
libpigpiod-if1/stable 1.78-1 armhf
libpigpiod-if2-1/stable 1.78-1 arm64
libpigpiod-if2-1/stable 1.78-1 armhf
pigpio-tools/stable 1.78-1 arm64
pigpio-tools/stable 1.78-1 armhf
python3-gpiozero/stable 1.4.1-1.3 arm64
python3-gpiozero/stable 1.4.1-1.3 armhf
python3-libgpiod/stable 1.6.2-1 arm64
python3-libgpiod/stable 1.6.2-1 armhf
python3-pigpio/stable,stable 1.78-1 all
python3-rpi.gpio/stable 0.7.0-0.2+b2 arm64
python3-rpi.gpio/stable 0.7.0-0.2+b2 armhf
rpi.gpio-common/stable,now 0.7.0-0.2+b2 arm64 [installed]
rpi.gpio-common/stable 0.7.0-0.2+b2 armhf
svxlink-gpio/stable,stable 19.09.1-3 all
comet@mangopi:~$ sudo apt list | grep sunxi

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

sunxi-tools/stable,now 1.4.2+git20181114.6d598a-3 arm64 [installed]
sunxi-tools/stable 1.4.2+git20181114.6d598a-3 armhf
u-boot-sunxi/stable 2021.01+dfsg-5 arm64
u-boot-sunxi/stable 2021.01+dfsg-5 armhf

Here is my source of image. Image source

VGCH commented 1 year ago

root@debian:~# uname -a Linux debian 5.16.17-sun50iw9 #3.0.0 SMP Wed Mar 8 19:23:56 PST 2023 aarch64 GNU/Linux

sudo apt list | grep gpio WARNING: apt does not have a stable CLI interface. Use with caution in scripts. gpiod/stable 1.6.2-1 arm64 gpiod/stable 1.6.2-1 armhf libgpiod-dev/stable 1.6.2-1 arm64 libgpiod-dev/stable 1.6.2-1 armhf libgpiod-doc/stable,stable 1.6.2-1 all libgpiod2/stable 1.6.2-1 arm64 libgpiod2/stable 1.6.2-1 armhf libpigpiod-if-dev/stable 1.78-1 arm64 libpigpiod-if-dev/stable 1.78-1 armhf libpigpiod-if1/stable 1.78-1 arm64 libpigpiod-if1/stable 1.78-1 armhf libpigpiod-if2-1/stable 1.78-1 arm64 libpigpiod-if2-1/stable 1.78-1 armhf pigpio-tools/stable 1.78-1 arm64 pigpio-tools/stable 1.78-1 armhf python3-gpiozero/stable 1.4.1-1.3 arm64 python3-gpiozero/stable 1.4.1-1.3 armhf python3-libgpiod/stable 1.6.2-1 arm64 python3-libgpiod/stable 1.6.2-1 armhf python3-pigpio/stable,stable 1.78-1 all python3-rpi.gpio/stable 0.7.0-0.2+b2 arm64 python3-rpi.gpio/stable 0.7.0-0.2+b2 armhf rpi.gpio-common/stable,now 0.7.0-0.2+b2 arm64 [installed] rpi.gpio-common/stable 0.7.0-0.2+b2 armhf svxlink-gpio/stable,stable 19.09.1-3 all

sudo apt list | grep sunxi WARNING: apt does not have a stable CLI interface. Use with caution in scripts. linux-dtb-current-sunxi64/bullseye 23.02.2 arm64 linux-dtb-edge-sunxi64/bullseye 23.02.2 arm64 linux-dtb-legacy-sunxi64/bullseye 21.02.3 arm64 linux-headers-current-sunxi64/bullseye 23.02.2 arm64 linux-headers-edge-sunxi64/bullseye 23.02.2 arm64 linux-headers-legacy-sunxi64/bullseye 21.02.3 arm64 linux-image-current-sunxi64/bullseye 23.02.2 arm64 linux-image-edge-sunxi64/bullseye 23.02.2 arm64 linux-image-legacy-sunxi64/bullseye 21.02.3 arm64 linux-source-5.15.43-current-sunxi64/bullseye,bullseye 5.15.43-current-sunxi64+22.05.1 all linux-source-5.15.43-current-sunxi/bullseye,bullseye 5.15.43-current-sunxi+22.05.1 all linux-source-5.15.48-current-sunxi64/bullseye,bullseye 5.15.48-current-sunxi64+22.05.3 all linux-source-5.15.48-current-sunxi/bullseye,bullseye 5.15.48-current-sunxi+22.05.3 all linux-source-5.15.69-current-sunxi64/bullseye,bullseye 5.15.69-current-sunxi64+22.08.2 all linux-source-5.15.69-current-sunxi/bullseye,bullseye 5.15.69-current-sunxi+22.08.2 all linux-source-5.15.72-current-sunxi64/bullseye,bullseye 5.15.72-current-sunxi64+22.08.4 all linux-source-5.15.72-current-sunxi/bullseye,bullseye 5.15.72-current-sunxi+22.08.4 all linux-source-5.15.74-current-sunxi64/bullseye,bullseye 5.15.74-current-sunxi64+22.08.6 all linux-source-5.15.74-current-sunxi/bullseye,bullseye 5.15.74-current-sunxi+22.08.6 all linux-source-5.15.80-current-sunxi64/bullseye,bullseye 5.15.80-current-sunxi64+22.11.1 all linux-source-5.15.80-current-sunxi/bullseye,bullseye 5.15.80-current-sunxi+22.11.1 all linux-source-5.15.89-current-sunxi64/bullseye,bullseye 5.15.89-current-sunxi64+22.11.4 all linux-source-5.15.89-current-sunxi/bullseye,bullseye 5.15.89-current-sunxi+22.11.4 all linux-source-5.15.93-current-sunxi64/bullseye,bullseye 5.15.93-current-sunxi64+23.02.2 all linux-source-5.15.93-current-sunxi/bullseye,bullseye 5.15.93-current-sunxi+23.02.2 all linux-source-5.17.11-edge-sunxi64/bullseye,bullseye 5.17.11-edge-sunxi64+22.05.1 all linux-source-5.17.11-edge-sunxi/bullseye,bullseye 5.17.11-edge-sunxi+22.05.1 all linux-source-5.19.10-edge-sunxi64/bullseye,bullseye 5.19.10-edge-sunxi64+22.08.2 all linux-source-5.19.10-edge-sunxi/bullseye,bullseye 5.19.10-edge-sunxi+22.08.2 all linux-source-5.19.14-edge-sunxi64/bullseye,bullseye 5.19.14-edge-sunxi64+22.08.4 all linux-source-5.19.14-edge-sunxi/bullseye,bullseye 5.19.14-edge-sunxi+22.08.4 all linux-source-5.19.16-edge-sunxi64/bullseye,bullseye 5.19.16-edge-sunxi64+22.08.6 all linux-source-5.19.16-edge-sunxi/bullseye,bullseye 5.19.16-edge-sunxi+22.08.6 all linux-source-5.19.4-edge-sunxi64/bullseye,bullseye 5.19.4-edge-sunxi64+22.08.1 all linux-source-5.19.4-edge-sunxi/bullseye,bullseye 5.19.4-edge-sunxi+22.08.1 all linux-source-6.0.10-edge-sunxi64/bullseye,bullseye 6.0.10-edge-sunxi64+22.11.1 all linux-source-6.0.10-edge-sunxi/bullseye,bullseye 6.0.10-edge-sunxi+22.11.1 all linux-source-6.1.11-edge-sunxi64/bullseye,bullseye 6.1.11-edge-sunxi64+23.02.2 all linux-source-6.1.11-edge-sunxi/bullseye,bullseye 6.1.11-edge-sunxi+23.02.2 all linux-source-6.1.7-edge-sunxi64/bullseye,bullseye 6.1.7-edge-sunxi64+22.11.4 all linux-source-6.1.7-edge-sunxi/bullseye,bullseye 6.1.7-edge-sunxi+22.11.4 all sunxi-tools/stable,now 1.4.2+git20181114.6d598a-3 arm64 [installed] sunxi-tools/stable 1.4.2+git20181114.6d598a-3 armhf u-boot-sunxi/stable 2021.01+dfsg-5 arm64 u-boot-sunxi/stable 2021.01+dfsg-5 armhf

Here is my source of image. Image source

I am using the same image

mamin27 commented 1 year ago

And how did you run pinmux-pins command. I don't have such command. I did not find how to install. I have similar command:

comet@mangopi:~$ sudo gpioinfo
[sudo] password for comet:
gpiochip0 - 288 lines:
        line   0:      unnamed       kernel   input  active-high [used]
        line   1:      unnamed       kernel   input  active-high [used]
        line   2:      unnamed       kernel   input  active-high [used]
        line   3:      unnamed       kernel   input  active-high [used]
        line   4:      unnamed       kernel   input  active-high [used]
        line   5:      unnamed       kernel   input  active-high [used]
        line   6:      unnamed       kernel   input  active-high [used]
        line   7:      unnamed       kernel   input  active-high [used]
        line   8:      unnamed       kernel   input  active-high [used]
        line   9:      unnamed       kernel   input  active-high [used]
        line  10:      unnamed       unused   input  active-high
        line  11:      unnamed       unused   input  active-high
        line  12:      unnamed       kernel   input  active-high [used]
        line  13:      unnamed       unused   input  active-high
        line  14:      unnamed       unused   input  active-high
        line  15:      unnamed       unused   input  active-high
        line  16:      unnamed       unused   input  active-high
        line  17:      unnamed       unused   input  active-high
        line  18:      unnamed       unused   input  active-high
        line  19:      unnamed       unused   input  active-high
        line  20:      unnamed       unused   input  active-high
        line  21:      unnamed       unused   input  active-high
        line  22:      unnamed       unused   input  active-high
        line  23:      unnamed       unused   input  active-high
        line  24:      unnamed       unused   input  active-high
        line  25:      unnamed       unused   input  active-high
        line  26:      unnamed       unused   input  active-high
        line  27:      unnamed       unused   input  active-high
        line  28:      unnamed       unused   input  active-high
        line  29:      unnamed       unused   input  active-high
        line  30:      unnamed       unused   input  active-high
        line  31:      unnamed       unused   input  active-high
        line  32:      unnamed       unused   input  active-high
        line  33:      unnamed       unused   input  active-high
        line  34:      unnamed       unused   input  active-high
        line  35:      unnamed       unused   input  active-high
        line  36:      unnamed       unused   input  active-high
        line  37:      unnamed       unused   input  active-high
        line  38:      unnamed       unused   input  active-high
        line  39:      unnamed       unused   input  active-high
        line  40:      unnamed       unused   input  active-high
        line  41:      unnamed       unused   input  active-high
        line  42:      unnamed       unused   input  active-high
        line  43:      unnamed       unused   input  active-high
        line  44:      unnamed       unused   input  active-high
        line  45:      unnamed       unused   input  active-high
        line  46:      unnamed       unused   input  active-high
        line  47:      unnamed       unused   input  active-high
        line  48:      unnamed       unused   input  active-high
        line  49:      unnamed       unused   input  active-high
        line  50:      unnamed       unused   input  active-high
        line  51:      unnamed       unused   input  active-high
        line  52:      unnamed       unused   input  active-high
        line  53:      unnamed       unused   input  active-high
        line  54:      unnamed       unused   input  active-high
        line  55:      unnamed       unused   input  active-high
        line  56:      unnamed       unused   input  active-high
        line  57:      unnamed       unused   input  active-high
        line  58:      unnamed       unused   input  active-high
        line  59:      unnamed       unused   input  active-high
        line  60:      unnamed       unused   input  active-high
        line  61:      unnamed       unused   input  active-high
        line  62:      unnamed       unused   input  active-high
        line  63:      unnamed       unused   input  active-high
        line  64:      unnamed       unused   input  active-high
        line  65:      unnamed       unused   input  active-high
        line  66:      unnamed       unused   input  active-high
        line  67:      unnamed       unused   input  active-high
        line  68:      unnamed       unused   input  active-high
        line  69:      unnamed       unused   input  active-high
        line  70:      unnamed       unused   input  active-high
        line  71:      unnamed       unused   input  active-high
        line  72:      unnamed       unused   input  active-high
        line  73:      unnamed       unused   input  active-high
        line  74:      unnamed   "i2c-gpio"  output  active-high [used open-drain]
        line  75:      unnamed       unused   input  active-high
        line  76:      unnamed   "i2c-gpio"  output  active-high [used open-drain]
        line  77:      unnamed       unused   input  active-high
        line  78:      unnamed       unused   input  active-high
        line  79:      unnamed       unused   input  active-high
        line  80:      unnamed       unused   input  active-high
        line  81:      unnamed       unused   input  active-high
        line  82:      unnamed       unused   input  active-high
        line  83:      unnamed       unused   input  active-high
        line  84:      unnamed       unused   input  active-high
        line  85:      unnamed       unused   input  active-high
        line  86:      unnamed       unused   input  active-high
        line  87:      unnamed       unused   input  active-high
        line  88:      unnamed       unused   input  active-high
        line  89:      unnamed       unused   input  active-high
        line  90:      unnamed       unused   input  active-high
        line  91:      unnamed       unused   input  active-high
        line  92:      unnamed       unused   input  active-high
        line  93:      unnamed       unused   input  active-high
        line  94:      unnamed       unused   input  active-high
        line  95:      unnamed       unused   input  active-high
        line  96:      unnamed       unused   input  active-high
        line  97:      unnamed       unused   input  active-high
        line  98:      unnamed       unused   input  active-high
        line  99:      unnamed       unused   input  active-high
        line 100:      unnamed       unused   input  active-high
        line 101:      unnamed       unused   input  active-high
        line 102:      unnamed       unused   input  active-high
        line 103:      unnamed       unused   input  active-high
        line 104:      unnamed       unused   input  active-high
        line 105:      unnamed       unused   input  active-high
        line 106:      unnamed       unused   input  active-high
        line 107:      unnamed       unused   input  active-high
        line 108:      unnamed       unused   input  active-high
        line 109:      unnamed       unused   input  active-high
        line 110:      unnamed       unused   input  active-high
        line 111:      unnamed       unused   input  active-high
        line 112:      unnamed       unused   input  active-high
        line 113:      unnamed       unused   input  active-high
        line 114:      unnamed       unused   input  active-high
        line 115:      unnamed       unused   input  active-high
        line 116:      unnamed       unused   input  active-high
        line 117:      unnamed       unused   input  active-high
        line 118:      unnamed       unused   input  active-high
        line 119:      unnamed       unused   input  active-high
        line 120:      unnamed       unused   input  active-high
        line 121:      unnamed       unused   input  active-high
        line 122:      unnamed       unused   input  active-high
        line 123:      unnamed       unused   input  active-high
        line 124:      unnamed       unused   input  active-high
        line 125:      unnamed       unused   input  active-high
        line 126:      unnamed       unused   input  active-high
        line 127:      unnamed       unused   input  active-high
        line 128:      unnamed       unused   input  active-high
        line 129:      unnamed       unused   input  active-high
        line 130:      unnamed       unused   input  active-high
        line 131:      unnamed       unused   input  active-high
        line 132:      unnamed       unused   input  active-high
        line 133:      unnamed       unused   input  active-high
        line 134:      unnamed       unused   input  active-high
        line 135:      unnamed       unused   input  active-high
        line 136:      unnamed       unused   input  active-high
        line 137:      unnamed       unused   input  active-high
        line 138:      unnamed       unused   input  active-high
        line 139:      unnamed       unused   input  active-high
        line 140:      unnamed       unused   input  active-high
        line 141:      unnamed       unused   input  active-high
        line 142:      unnamed       unused   input  active-high
        line 143:      unnamed       unused   input  active-high
        line 144:      unnamed       unused   input  active-high
        line 145:      unnamed       unused   input  active-high
        line 146:      unnamed       unused   input  active-high
        line 147:      unnamed       unused   input  active-high
        line 148:      unnamed       unused   input  active-high
        line 149:      unnamed       unused   input  active-high
        line 150:      unnamed       unused   input  active-high
        line 151:      unnamed       unused   input  active-high
        line 152:      unnamed       unused   input  active-high
        line 153:      unnamed       unused   input  active-high
        line 154:      unnamed       unused   input  active-high
        line 155:      unnamed       unused   input  active-high
        line 156:      unnamed       unused   input  active-high
        line 157:      unnamed       unused   input  active-high
        line 158:      unnamed       unused   input  active-high
        line 159:      unnamed       unused   input  active-high
        line 160:      unnamed       kernel   input  active-high [used]
        line 161:      unnamed       kernel   input  active-high [used]
        line 162:      unnamed       kernel   input  active-high [used]
        line 163:      unnamed       kernel   input  active-high [used]
        line 164:      unnamed       kernel   input  active-high [used]
        line 165:      unnamed       kernel   input  active-high [used]
        line 166:      unnamed       unused   input  active-high
        line 167:      unnamed       unused   input  active-high
        line 168:      unnamed       unused   input  active-high
        line 169:      unnamed       unused   input  active-high
        line 170:      unnamed       unused   input  active-high
        line 171:      unnamed       unused   input  active-high
        line 172:      unnamed       unused   input  active-high
        line 173:      unnamed       unused   input  active-high
        line 174:      unnamed       unused   input  active-high
        line 175:      unnamed       unused   input  active-high
        line 176:      unnamed       unused   input  active-high
        line 177:      unnamed       unused   input  active-high
        line 178:      unnamed       unused   input  active-high
        line 179:      unnamed       unused   input  active-high
        line 180:      unnamed       unused   input  active-high
        line 181:      unnamed       unused   input  active-high
        line 182:      unnamed       unused   input  active-high
        line 183:      unnamed       unused   input  active-high
        line 184:      unnamed       unused   input  active-high
        line 185:      unnamed       unused   input  active-high
        line 186:      unnamed       unused   input  active-high
        line 187:      unnamed       unused   input  active-high
        line 188:      unnamed       unused   input  active-high
        line 189:      unnamed       unused   input  active-high
        line 190:      unnamed       unused   input  active-high
        line 191:      unnamed       unused   input  active-high
        line 192:      unnamed       kernel   input  active-high [used]
        line 193:      unnamed       kernel   input  active-high [used]
        line 194:      unnamed       kernel   input  active-high [used]
        line 195:      unnamed       kernel   input  active-high [used]
        line 196:      unnamed       kernel   input  active-high [used]
        line 197:      unnamed       kernel   input  active-high [used]
        line 198:      unnamed       unused   input  active-high
        line 199:      unnamed       unused   input  active-high
        line 200:      unnamed       unused   input  active-high
        line 201:      unnamed       unused   input  active-high
        line 202:      unnamed       unused   input  active-high
        line 203:      unnamed       unused   input  active-high
        line 204:      unnamed       unused   input  active-high
        line 205:      unnamed       unused   input  active-high
        line 206:      unnamed       unused   input  active-high
        line 207:      unnamed       unused   input  active-high
        line 208:      unnamed       unused   input  active-high
        line 209:      unnamed       unused   input  active-high
        line 210:      unnamed      "reset"  output   active-low [used]
        line 211:      unnamed       unused   input  active-high
        line 212:      unnamed       unused   input  active-high
        line 213:      unnamed       unused   input  active-high
        line 214:      unnamed       unused   input  active-high
        line 215:      unnamed       unused   input  active-high
        line 216:      unnamed       unused   input  active-high
        line 217:      unnamed       unused   input  active-high
        line 218:      unnamed       unused   input  active-high
        line 219:      unnamed       unused   input  active-high
        line 220:      unnamed       unused   input  active-high
        line 221:      unnamed       unused   input  active-high
        line 222:      unnamed       unused   input  active-high
        line 223:      unnamed       unused   input  active-high
        line 224:      unnamed       kernel   input  active-high [used]
        line 225:      unnamed       kernel   input  active-high [used]
        line 226:      unnamed       unused   input  active-high
        line 227:      unnamed       unused   input  active-high
        line 228:      unnamed       unused   input  active-high
        line 229:      unnamed       unused   input  active-high
        line 230:      unnamed       unused   input  active-high
        line 231:      unnamed       unused   input  active-high
        line 232:      unnamed       unused   input  active-high
        line 233:      unnamed       unused   input  active-high
        line 234:      unnamed       kernel   input  active-high [used]
        line 235:      unnamed       unused   input  active-high
        line 236:      unnamed       unused   input  active-high
        line 237:      unnamed       unused   input  active-high
        line 238:      unnamed       unused   input  active-high
        line 239:      unnamed       unused   input  active-high
        line 240:      unnamed       unused   input  active-high
        line 241:      unnamed       unused   input  active-high
        line 242:      unnamed       unused   input  active-high
        line 243:      unnamed       unused   input  active-high
        line 244:      unnamed       unused   input  active-high
        line 245:      unnamed       unused   input  active-high
        line 246:      unnamed       unused   input  active-high
        line 247:      unnamed       unused   input  active-high
        line 248:      unnamed       unused   input  active-high
        line 249:      unnamed       unused   input  active-high
        line 250:      unnamed       unused   input  active-high
        line 251:      unnamed       unused   input  active-high
        line 252:      unnamed       unused   input  active-high
        line 253:      unnamed       unused   input  active-high
        line 254:      unnamed       unused   input  active-high
        line 255:      unnamed       unused   input  active-high
        line 256:      unnamed       unused   input  active-high
        line 257:      unnamed       unused   input  active-high
        line 258:      unnamed       unused   input  active-high
        line 259:      unnamed       unused   input  active-high
        line 260:      unnamed       unused   input  active-high
        line 261:      unnamed       unused   input  active-high
        line 262:      unnamed       unused   input  active-high
        line 263:      unnamed       kernel   input  active-high [used]
        line 264:      unnamed       kernel   input  active-high [used]
        line 265:      unnamed       kernel   input  active-high [used]
        line 266:      unnamed       kernel   input  active-high [used]
        line 267:      unnamed       unused   input  active-high
        line 268:      unnamed       unused   input  active-high
        line 269:      unnamed       unused   input  active-high
        line 270:      unnamed       unused   input  active-high
        line 271:      unnamed       unused   input  active-high
        line 272:      unnamed       unused   input  active-high
        line 273:      unnamed       unused   input  active-high
        line 274:      unnamed       unused   input  active-high
        line 275:      unnamed       unused   input  active-high
        line 276:      unnamed       unused   input  active-high
        line 277:      unnamed       unused   input  active-high
        line 278:      unnamed       unused   input  active-high
        line 279:      unnamed       unused   input  active-high
        line 280:      unnamed       unused   input  active-high
        line 281:      unnamed       unused   input  active-high
        line 282:      unnamed       unused   input  active-high
        line 283:      unnamed       unused   input  active-high
        line 284:      unnamed       unused   input  active-high
        line 285:      unnamed       unused   input  active-high
        line 286:      unnamed       unused   input  active-high
        line 287:      unnamed       unused   input  active-high
gpiochip1 - 32 lines:
        line   0:      unnamed       unused   input  active-high
        line   1:      unnamed       unused   input  active-high
        line   2:      unnamed       unused   input  active-high
        line   3:      unnamed       unused   input  active-high
        line   4:      unnamed       unused   input  active-high
        line   5:      unnamed       unused   input  active-high
        line   6:      unnamed       unused   input  active-high
        line   7:      unnamed       unused   input  active-high
        line   8:      unnamed       unused   input  active-high
        line   9:      unnamed       unused   input  active-high
        line  10:      unnamed       unused   input  active-high
        line  11:      unnamed       unused   input  active-high
        line  12:      unnamed       unused   input  active-high
        line  13:      unnamed       unused   input  active-high
        line  14:      unnamed       unused   input  active-high
        line  15:      unnamed       unused   input  active-high
        line  16:      unnamed       unused   input  active-high
        line  17:      unnamed       unused   input  active-high
        line  18:      unnamed       unused   input  active-high
        line  19:      unnamed       unused   input  active-high
        line  20:      unnamed       unused   input  active-high
        line  21:      unnamed       unused   input  active-high
        line  22:      unnamed       unused   input  active-high
        line  23:      unnamed       unused   input  active-high
        line  24:      unnamed       unused   input  active-high
        line  25:      unnamed       unused   input  active-high
        line  26:      unnamed       unused   input  active-high
        line  27:      unnamed       unused   input  active-high
        line  28:      unnamed       unused   input  active-high
        line  29:      unnamed       unused   input  active-high
        line  30:      unnamed       unused   input  active-high
        line  31:      unnamed       unused   input  active-high

try to check also this:

comet@mangopi:~$ sudo lsmod
Module                  Size  Used by
zram                   32768  2
nls_iso8859_1          16384  1
8723ds               1429504  0
sunxi_cir              20480  0
rc_core                49152  2 sunxi_cir
dw_hdmi_cec            16384  0
cfg80211              352256  1 8723ds
sun50iw9_codec         28672  3
display_connector      20480  0
fuse                  126976  1
i2c_mv64xxx            24576  0
comet@mangopi:~$
VGCH commented 1 year ago

And how did you run pinmux-pins command. I don't have such command. I did not find how to install.

Just run the command sudo cat /sys/kernel/debug/pinctrl/pinctrl-devices

For example, output from Raspberry Pi 4 Model B: Pinctrl maps:

device fe201000.serial
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio30
function alt3

device fe201000.serial
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio30
config 00000280

device fe201000.serial
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio31
function alt3

device fe201000.serial
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio31
config 00000080

device fe201000.serial
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio32
function alt3

device fe201000.serial
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio32
config 00000080

device fe201000.serial
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio33
function alt3

device fe201000.serial
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio33
config 00000280

device fe300000.mmcnr
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio34
function alt3

device fe300000.mmcnr
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio34
config 00000080

device fe300000.mmcnr
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio35
function alt3

device fe300000.mmcnr
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio35
config 00000280

device fe300000.mmcnr
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio36
function alt3

device fe300000.mmcnr
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio36
config 00000280

device fe300000.mmcnr
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio37
function alt3

device fe300000.mmcnr
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio37
config 00000280

device fe300000.mmcnr
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio38
function alt3

device fe300000.mmcnr
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio38
config 00000280

device fe300000.mmcnr
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio39
function alt3

device fe300000.mmcnr
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio39
config 00000280

device bcm2835_audio
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio40
function alt0

device bcm2835_audio
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio41
function alt0

device fe203000.i2s
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio18
function alt0

device fe203000.i2s
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio19
function alt0

device fe203000.i2s
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio20
function alt0

device fe203000.i2s
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio21
function alt0

device fe204000.spi
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio9
function alt0

device fe204000.spi
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio10
function alt0

device fe204000.spi
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio11
function alt0

device fe204000.spi
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio8
function gpio_out

device fe204000.spi
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio7
function gpio_out

device fe804000.i2c
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio2
function alt0

device fe804000.i2c
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio2
config 00000280

device fe804000.i2c
state default
type MUX_GROUP (2)
controlling device fe200000.gpio
group gpio3
function alt0

device fe804000.i2c
state default
type CONFIGS_PIN (3)
controlling device fe200000.gpio
pin gpio3
config 00000280

Output from H616 MQ-Quad:

Pinctrl maps:
device 5000000.serial
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PH0
function uart0

device 5000000.serial
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PH1
function uart0

device 4021000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PG0
function mmc1

device 4021000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PG0
config 00002809
config 00000105

device 4021000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PG1
function mmc1

device 4021000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PG1
config 00002809
config 00000105

device 4021000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PG2
function mmc1

device 4021000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PG2
config 00002809
config 00000105

device 4021000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PG3
function mmc1

device 4021000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PG3
config 00002809
config 00000105

device 4021000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PG4
function mmc1

device 4021000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PG4
config 00002809
config 00000105

device 4021000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PG5
function mmc1

device 4021000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PG5
config 00002809
config 00000105

device 5002400.i2c
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PI7
function i2c1

device 5002400.i2c
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PI8
function i2c1

device 5002800.i2c
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PI9
function i2c2

device 5002800.i2c
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PI10
function i2c2

device 4020000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PF0
function mmc0

device 4020000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PF0
config 00002809
config 00000105

device 4020000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PF1
function mmc0

device 4020000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PF1
config 00002809
config 00000105

device 4020000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PF2
function mmc0

device 4020000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PF2
config 00002809
config 00000105

device 4020000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PF3
function mmc0

device 4020000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PF3
config 00002809
config 00000105

device 4020000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PF4
function mmc0

device 4020000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PF4
config 00002809
config 00000105

device 4020000.mmc
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PF5
function mmc0

device 4020000.mmc
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PF5
config 00002809
config 00000105

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA0
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA0
config 00002809

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA1
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA1
config 00002809

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA2
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA2
config 00002809

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA3
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA3
config 00002809

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA4
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA4
config 00002809

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA5
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA5
config 00002809

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA6
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA6
config 00002809

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA7
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA7
config 00002809

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA8
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA8
config 00002809

device 5030000.ethernet
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PA9
function emac1

device 5030000.ethernet
state default
type CONFIGS_GROUP (4)
controlling device 300b000.pinctrl
group PA9
config 00002809

device 7040000.ir
state default
type MUX_GROUP (2)
controlling device 300b000.pinctrl
group PH10
function ir_rx

root@debian:~# sudo lsmod

Module                  Size  Used by
zram                   32768  2
nls_iso8859_1          16384  1
8723ds               1441792  0
sunxi_cir              20480  0
rc_core                49152  2 sunxi_cir
dw_hdmi_cec            16384  0
cfg80211              352256  1 8723ds
sunxi_cedrus           49152  0
sun50iw9_codec         28672  3
videobuf2_dma_contig    24576  1 sunxi_cedrus
v4l2_mem2mem           36864  1 sunxi_cedrus
videobuf2_memops       20480  1 videobuf2_dma_contig
pwm_sunxi_enhance      20480  0
videobuf2_v4l2         24576  2 sunxi_cedrus,v4l2_mem2mem
videobuf2_common       49152  5 sunxi_cedrus,videobuf2_dma_contig,videobuf2_v4l2,v4l2_mem2mem,videobuf2_memops
videodev              204800  4 sunxi_cedrus,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
mc                     49152  5 sunxi_cedrus,videodev,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
i2c_gpio               20480  0
display_connector      20480  0
cpufreq_dt             20480  0
snd_soc_wm8960         45056  0
snd_soc_wm8960_soundcard    24576  0
snd_soc_simple_card_utils    24576  1 snd_soc_wm8960_soundcard
fuse                  126976  1
i2c_mv64xxx            24576  0
mamin27 commented 1 year ago

Ok, you have more added than me. So i2c should also work in your case.

root@mangopi:/sys/kernel/debug/pinctrl# cat /sys/kernel/debug/pinctrl/pinctrl-devices
name [pinmux] [pinconf]
300b000.pinctrl yes yes
7022000.pinctrl yes yes
root@mangopi:/sys/kernel/debug/pinctrl# ls -l /dev/i2c-*
crw-rw---- 1 root i2c 89, 0 Mar 27 20:17 /dev/i2c-0
crw-rw---- 1 root i2c 89, 1 Mar 27 20:17 /dev/i2c-1
crw-rw---- 1 root i2c 89, 2 Mar 27 20:17 /dev/i2c-2
crw-rw---- 1 root i2c 89, 3 Mar 27 20:17 /dev/i2c-3
crw-rw---- 1 root i2c 89, 4 Mar 27 20:17 /dev/i2c-4

root@mangopi:/sys/kernel/debug/pinctrl# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@mangopi:/sys/kernel/debug/pinctrl# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
root@mangopi:/sys/kernel/debug/pinctrl# i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@mangopi:/sys/kernel/debug/pinctrl# i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- UU -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@mangopi:/sys/kernel/debug/pinctrl# i2cdetect -y 4
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: 30 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

i2c-1 is working at GPIO ports mangopi_port

Here is how it is looking. I have connected I2C EEPROM device ant the i2c-1 network https://twitter.com/mminar7/status/1638211363691438084

VGCH commented 1 year ago

Yes i2c works fine, but the i2s interface does not work, it is not defined in the system.

2023-03-28 в 15 12 11

mamin27 commented 1 year ago

Yes ... I did not tested it yes. (i2s). That's reason. So let's investigate together: GPIO port: i2s

H616 chip pin: i2s-2

So I2S pins are connected to GPIO port.

Probably it is also working but how it could be tested? You have some I2S test board connected at the GPIO?

VGCH commented 1 year ago

Yes, I have two i2s devices wm8960 sound card and microphone. The device works on Raspberry Pi 4. Comparing the pinctrl configuration of the two devices, I came to the conclusion that the i2s pins are not defined by the system as i2s.

mamin27 commented 1 year ago

H616 has two i2s pins: H_I2S2 at port pins "PG10 ..PG14" H_I2S3 at port pins "PH5..PH9"

in dts file is defined H_I2S3 with correct pins assignmed. These pins are connected to GPIO port.

i2s3-pins {
                                pins = "PH5\0PH6\0PH7\0PH8\0PH9";
                                function = "i2s3";
                                phandle = <0x27>;
                        };
...
ahub-i2s1@0x05097000 {
            #sound-dai-cells = <0x00>;
            compatible = "allwinner,sunxi-ahub-daudio";
            reg = <0x5097000 0xadf>;
            clocks = <0x02 0x5f 0x02 0x5b 0x02 0x5c 0x02 0x5e>;
            clock-names = "apb\0audio-codec-1x\0audio-codec-4x\0audio-hub";
            tdm_num = <0x01>;
            pinconfig = <0x00>;
            frametype = <0x00>;
            pcm_lrck_period = <0x20>;
            slot_width_select = <0x20>;
            daudio_master = <0x04>;
            audio_format = <0x01>;
            signal_inversion = <0x01>;
            tdm_config = <0x01>;
            mclk_div = <0x01>;
            status = "okay";
            phandle = <0x3c>;
        };

ahub-i2s3@0x05097000 {
            compatible = "allwinner,sunxi-ahub-daudio";
            reg = <0x5097000 0xadf>;
            clocks = <0x02 0x5f 0x02 0x5b 0x02 0x5c 0x02 0x5e>;
            clock-names = "apb\0audio-codec-1x\0audio-codec-4x\0audio-hub";
            pinctrl-names = "default";
            pinctrl-0 = <0x26>;
            tdm_num = <0x03>;
            pinconfig = <0x01>;
            frametype = <0x00>;
            pcm_lrck_period = <0x20>;
            slot_width_select = <0x20>;
            daudio_master = <0x04>;
            audio_format = <0x01>;
            signal_inversion = <0x01>;
            tdm_config = <0x01>;
            mclk_div = <0x04>;
            status = "disabled";
            phandle = <0x68>;
        };

This part:

i2s3-pins {
                                pins = "PH5\0PH6\0PH7\0PH8\0PH9";
                                function = "i2s3";
                                phandle = <0x27>;
                        };

means that i2s pins are set at the H616 chip.

Let's look at discussion of kernel designers: https://lore.kernel.org/all/CACRpkdZ528B4b9XzBpfGAwPbDaDH12LQ8rTce9AsDuKF+v5A=A@mail.gmail.com/

From my point of you it is defined in dts file but there could be some mistake in kernel or in dts file.

VGCH commented 1 year ago

I tried to change pins to: pins = "PH5\0PH6\0PH7\0PH8\0PH9";

But I am getting an error:

dmesg | grep i2s
[    3.270746] sun50i-h616-pinctrl 300b000.pinctrl: unsupported function i2s3 on pin PH8
[    3.278653] sun50i-h616-pinctrl 300b000.pinctrl: unsupported function i2s3 on pin PH9
[    3.286540] sun50i-h616-pinctrl 300b000.pinctrl: pin PH5 already requested by 300b000.pinctrl:229; cannot claim for 5097000.ahub-i2s3
[    3.298545] sun50i-h616-pinctrl 300b000.pinctrl: pin-229 (5097000.ahub-i2s3) status -22
[    3.317599] sunxi-ahub-daudio 5097000.ahub-i2s3: Error applying setting, reverse things back

And the HDMI audio device disappears from the aplay list

mamin27 commented 1 year ago

Moment, I made the mistake.

i2s3-pins {
                                pins = "PI5\0PI6\0PI7\0PI8\0PI9";
                                function = "i2s3";
                                phandle = <0x27>;
                        };

I saw that there are set different pins at the H616 ...

VGCH commented 1 year ago

I have errors:

root@debian:~# dmesg | grep i2s
[    3.266474] sun50i-h616-pinctrl 300b000.pinctrl: unsupported function i2s3 on pin PI5
[    3.274381] sun50i-h616-pinctrl 300b000.pinctrl: unsupported function i2s3 on pin PI6
[    3.282228] sun50i-h616-pinctrl 300b000.pinctrl: unsupported function i2s3 on pin PI7
[    3.290074] sun50i-h616-pinctrl 300b000.pinctrl: unsupported function i2s3 on pin PI8
[    3.297913] sun50i-h616-pinctrl 300b000.pinctrl: unsupported function i2s3 on pin PI9
[    3.305749] sunxi-ahub-daudio 5097000.ahub-i2s3: there is not valid maps for state default
mamin27 commented 1 year ago

Let's look at https://github.com/torvalds/linux/blob/master/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c reduced not interresting rows:

SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 5),
          SUNXI_FUNCTION(0x3, "i2s3"),  /* MCLK */
    SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 6),
          SUNXI_FUNCTION(0x3, "i2s3"),  /* BCLK */
    SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 7),
          SUNXI_FUNCTION(0x3, "i2s3"),  /* SYNC */
    SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 8),
          SUNXI_FUNCTION(0x3, "i2s3_dout0"),    /* DO0 */
          SUNXI_FUNCTION(0x5, "i2s3_din1"), /* DI1 */
    SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 9),
          SUNXI_FUNCTION(0x3, "i2s3_din0"), /* DI0 */
          SUNXI_FUNCTION(0x5, "i2s3_dout1"),    /* DO1 */

so setting of dts was correct

i2s3-pins {
                                pins = "PH5\0PH6\0PH7\0PH8\0PH9";
                                function = "i2s3";
                                phandle = <0x27>;
                        };

But mangopi these pins set as SPI1 pins so now i2s3 is not usable

Other free i2s0 pins are:

SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 0),
          SUNXI_FUNCTION(0x4, "i2s0"),  /* MCLK */
    SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 1),
          SUNXI_FUNCTION(0x4, "i2s0"),  /* BCLK */
    SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 2),
          SUNXI_FUNCTION(0x4, "i2s0"),  /* SYNC */
    SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 3),
          SUNXI_FUNCTION(0x5, "i2s0_din1"), /* DI1 */
    SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 4),
          SUNXI_FUNCTION(0x5, "i2s0_dout1"),    /* DO1 */

so it should be set as

                ahub-i2s0@0x05097000 {
                        compatible = "allwinner,sunxi-ahub-daudio";
                        reg = <0x5097000 0xadf>;
                        clocks = <0x02 0x5f 0x02 0x5b 0x02 0x5c 0x02 0x5e>;
                        clock-names = "apb\0audio-codec-1x\0audio-codec-4x\0audio-hub";
                        pinctrl-names = "default","default","default";
                        pinctrl-0 = <0x26>;
                        pinctrl-1 = <0xb0>;
                        pinctrl-2 = <0xb1>;
                        tdm_num = <0x03>;
                        pinconfig = <0x01>;
                        frametype = <0x00>;
                        pcm_lrck_period = <0x20>;
                        slot_width_select = <0x20>;
                        daudio_master = <0x04>;
                        audio_format = <0x01>;
                        signal_inversion = <0x01>;
                        tdm_config = <0x01>;
                        mclk_div = <0x04>;
                        status = "okay";
                        phandle = <0x68>;
                };
...
i2s0-pins {
                                pins = "PI0\0PI1\0PI2";
                                function = "i2s0";
                                phandle = <0x27>;
                        };
i2s0-in-pins {
                                pins = "PI3";
                                function = "i2s0_din1";
                                phandle = <0xb0>;
                        };
i2s0-out-pins {
                                pins = "PI4";
                                function = "i2s0_dout1";
                                phandle = <0xb1>;
                        };
...
ahub_i2s0 = "/soc/ahub-i2s0@05097000";
...
i2s0_pins = "/soc/pinctrl@300b000/i2s-pins";
i2s0_in_pins = "/soc/pinctrl@300b000/i2s-in-pins";
i2s0_out_pins = "/soc/pinctrl@300b000/i2s-out-pins";

i2s3-pins would be replaced with i2s0

Better is to add dts file:

/dts-v1/;

/ {
    interrupt-parent = <0x01>;
    #address-cells = <0x02>;
    #size-cells = <0x02>;
    model = "MQ-QUAD-H616";
    compatible = "allwinner,sun50i-h616";

    cpus {
        #address-cells = <0x01>;
        #size-cells = <0x00>;

        cpu@0 {
            compatible = "arm,cortex-a53";
            device_type = "cpu";
            reg = <0x00>;
            enable-method = "psci";
            clocks = <0x02 0x15>;
            clock-latency-ns = <0x3b9b0>;
            #cooling-cells = <0x02>;
            operating-points-v2 = <0x03>;
            cpu-supply = <0x04>;
            phandle = <0x06>;
        };

        cpu@1 {
            compatible = "arm,cortex-a53";
            device_type = "cpu";
            reg = <0x01>;
            enable-method = "psci";
            clocks = <0x02 0x15>;
            clock-latency-ns = <0x3b9b0>;
            #cooling-cells = <0x02>;
            operating-points-v2 = <0x03>;
            phandle = <0x07>;
        };

        cpu@2 {
            compatible = "arm,cortex-a53";
            device_type = "cpu";
            reg = <0x02>;
            enable-method = "psci";
            clocks = <0x02 0x15>;
            clock-latency-ns = <0x3b9b0>;
            #cooling-cells = <0x02>;
            operating-points-v2 = <0x03>;
            phandle = <0x08>;
        };

        cpu@3 {
            compatible = "arm,cortex-a53";
            device_type = "cpu";
            reg = <0x03>;
            enable-method = "psci";
            clocks = <0x02 0x15>;
            clock-latency-ns = <0x3b9b0>;
            #cooling-cells = <0x02>;
            operating-points-v2 = <0x03>;
            phandle = <0x09>;
        };
    };

    display-engine {
        compatible = "allwinner,sun50i-h616-display-engine";
        allwinner,pipelines = <0x05>;
        status = "okay";
        phandle = <0x51>;
    };

    reserved-memory {
        #address-cells = <0x02>;
        #size-cells = <0x02>;
        ranges;

        secmon@40000000 {
            reg = <0x00 0x40000000 0x00 0x80000>;
            no-map;
            phandle = <0x52>;
        };
    };

    osc24M_clk {
        #clock-cells = <0x00>;
        compatible = "fixed-clock";
        clock-frequency = <0x16e3600>;
        clock-output-names = "osc24M";
        phandle = <0x0d>;
    };

    pmu {
        compatible = "arm,cortex-a53-pmu";
        interrupts = <0x00 0x8c 0x04 0x00 0x8d 0x04 0x00 0x8e 0x04 0x00 0x8f 0x04>;
        interrupt-affinity = <0x06 0x07 0x08 0x09>;
    };

    psci {
        compatible = "arm,psci-0.2";
        method = "smc";
    };

    timer {
        compatible = "arm,armv8-timer";
        arm,no-tick-in-suspend;
        interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>;
    };

    soc {
        compatible = "simple-bus";
        #address-cells = <0x01>;
        #size-cells = <0x01>;
        ranges = <0x00 0x00 0x00 0x40000000>;

        bus@1000000 {
            compatible = "allwinner,sun50i-h616-de33\0allwinner,sun50i-a64-de2";
            reg = <0x1000000 0x400000>;
            allwinner,sram = <0x0a 0x01>;
            #address-cells = <0x01>;
            #size-cells = <0x01>;
            ranges = <0x00 0x1000000 0x400000>;

            clock@8000 {
                compatible = "allwinner,sun50i-h616-de33-clk";
                reg = <0x8000 0x100>;
                clocks = <0x02 0x1d 0x02 0x1e>;
                clock-names = "mod\0bus";
                resets = <0x02 0x01>;
                #clock-cells = <0x01>;
                #reset-cells = <0x01>;
                phandle = <0x0b>;
            };

            mixer@100000 {
                compatible = "allwinner,sun50i-h616-de33-mixer-0";
                reg = <0x100000 0x100000 0x8100 0x40 0x280000 0x20000>;
                clocks = <0x0b 0x00 0x0b 0x06>;
                clock-names = "bus\0mod";
                resets = <0x0b 0x00>;
                phandle = <0x05>;

                ports {
                    #address-cells = <0x01>;
                    #size-cells = <0x00>;

                    port@1 {
                        reg = <0x01>;
                        phandle = <0x53>;

                        endpoint {
                            remote-endpoint = <0x0c>;
                            phandle = <0x3d>;
                        };
                    };
                };
            };
        };

        syscon@3000000 {
            compatible = "allwinner,sun50i-h616-system-control";
            reg = <0x3000000 0x30 0x3000038 0xfc8>;
            #address-cells = <0x01>;
            #size-cells = <0x01>;
            ranges;
            phandle = <0x31>;

            sram@100000 {
                compatible = "mmio-sram";
                reg = <0x100000 0x18000>;
                #address-cells = <0x01>;
                #size-cells = <0x01>;
                ranges = <0x00 0x100000 0x18000>;
                phandle = <0x54>;

                scpi-sram@17c00 {
                    compatible = "arm,scp-shmem";
                    reg = <0x17c00 0x200>;
                    phandle = <0x55>;
                };
            };

            sram@28000 {
                compatible = "mmio-sram";
                reg = <0x28000 0x30000>;
                #address-cells = <0x01>;
                #size-cells = <0x01>;
                ranges = <0x00 0x28000 0x30000>;
                phandle = <0x56>;

                sram-section@0 {
                    compatible = "allwinner,sun50i-h616-sram-c\0allwinner,sun50i-a64-sram-c";
                    reg = <0x00 0x1e000>;
                    phandle = <0x0a>;
                };
            };

            sram@1a00000 {
                compatible = "mmio-sram";
                reg = <0x1a00000 0x200000>;
                #address-cells = <0x01>;
                #size-cells = <0x01>;
                ranges = <0x00 0x1a00000 0x200000>;
                phandle = <0x57>;

                sram-section@0 {
                    compatible = "allwinner,sun50i-h616-sram-c1";
                    reg = <0x00 0x200000>;
                    phandle = <0x41>;
                };
            };
        };

        clock@3001000 {
            compatible = "allwinner,sun50i-h616-ccu";
            reg = <0x3001000 0x1000>;
            clocks = <0x0d 0x0e 0x00 0x0e 0x02>;
            clock-names = "hosc\0losc\0iosc";
            #clock-cells = <0x01>;
            #reset-cells = <0x01>;
            phandle = <0x02>;
        };

        efuse@3006000 {
            compatible = "allwinner,sun50i-h616-sid";
            reg = <0x3006000 0x1000>;
            #address-cells = <0x01>;
            #size-cells = <0x01>;
            phandle = <0x58>;

            cpu-speed-grade@00 {
                reg = <0x00 0x02>;
                phandle = <0x59>;
            };

            thermal-sensor-calibration@14 {
                reg = <0x14 0x08>;
                phandle = <0x49>;
            };

            ephy-calibration@2c {
                reg = <0x2c 0x02>;
                phandle = <0x5a>;
            };
        };

        watchdog@30090a0 {
            compatible = "allwinner,sun50i-h616-wdt\0allwinner,sun6i-a31-wdt";
            reg = <0x30090a0 0x20>;
            interrupts = <0x00 0x32 0x04>;
            clocks = <0x0d>;
            status = "okay";
            phandle = <0x5b>;
        };

        pwm@300a000 {
            compatible = "allwinner,sun50i-h616-pwm";
            reg = <0x300a000 0x400>;
            clocks = <0x0d 0x02 0x2f>;
            clock-names = "mod\0bus";
            resets = <0x02 0x0a>;
            pwm-number = <0x06>;
            pwm-base = <0x00>;
            sunxi-pwms = <0x0f 0x10 0x11 0x12 0x13 0x14>;
            #pwm-cells = <0x03>;
            status = "okay";
            phandle = <0x5c>;
        };

        pwm0@0300a000 {
            compatible = "allwinner,sunxi-pwm0";
            phandle = <0x0f>;
        };

        pwm1@0300a000 {
            compatible = "allwinner,sunxi-pwm1";
            pinctrl-names = "default";
            pinctrl-0 = <0x15>;
            phandle = <0x10>;
        };

        pwm2@0300a000 {
            compatible = "allwinner,sunxi-pwm2";
            pinctrl-names = "default";
            pinctrl-0 = <0x16>;
            phandle = <0x11>;
        };

        pwm3@0300a000 {
            compatible = "allwinner,sunxi-pwm3";
            pinctrl-names = "default";
            pinctrl-0 = <0x17>;
            phandle = <0x12>;
        };

        pwm4@0300a000 {
            compatible = "allwinner,sunxi-pwm4";
            pinctrl-names = "default";
            pinctrl-0 = <0x18>;
            phandle = <0x13>;
        };

        pwm5@0300a000 {
            compatible = "allwinner,sunxi-pwm5";
            pinctrl-names = "default";
            pinctrl-0 = <0x19>;
            phandle = <0x14>;
        };

        pinctrl@300b000 {
            compatible = "allwinner,sun50i-h616-pinctrl";
            reg = <0x300b000 0x400>;
            interrupts = <0x00 0x33 0x04 0x00 0x34 0x04 0x00 0x35 0x04 0x00 0x2b 0x04 0x00 0x36 0x04 0x00 0x37 0x04 0x00 0x38 0x04 0x00 0x39 0x04>;
            clocks = <0x02 0x1a 0x0d 0x0e 0x00>;
            clock-names = "apb\0hosc\0losc";
            gpio-controller;
            #gpio-cells = <0x03>;
            interrupt-controller;
            #interrupt-cells = <0x03>;
            phandle = <0x2f>;

            rgmii-pins {
                pins = "PI0\0PI1\0PI2\0PI3\0PI4\0PI5\0PI7\0PI8\0PI9\0PI10\0PI11\0PI12\0PI13\0PI14\0PI15\0PI16";
                function = "emac0";
                drive-strength = <0x28>;
                phandle = <0x32>;
            };

            rmii-pins {
                pins = "PA0\0PA1\0PA2\0PA3\0PA4\0PA5\0PA6\0PA7\0PA8\0PA9";
                function = "emac1";
                drive-strength = <0x28>;
                phandle = <0x34>;
            };

            i2c0-pins {
                pins = "PI5\0PI6";
                function = "i2c0";
                phandle = <0x28>;
            };

            i2c1-pins {
                pins = "PI7\0PI8";
                function = "i2c1";
                phandle = <0x29>;
            };

            i2c2-pins {
                pins = "PI9\0PI10";
                function = "i2c2";
                phandle = <0x2a>;
            };

            i2c3-pins {
                pins = "PG17\0PG18";
                function = "i2c3";
                phandle = <0x2b>;
            };

            i2c4-pins {
                pins = "PH6\0PH7";
                function = "i2c4";
                phandle = <0x2c>;
            };

            i2s0-pins {
                pins = "PI0\0PI1\0PI2";
                function = "i2s0";
                phandle = <0x26>;
            };
                        i2s0-in-pins {
                                pins = "PI3";
                                function = "i2s0_din1";
                                phandle = <0xb0>;
                        };
                        i2s0-out-pins {
                                pins = "PI4";
                                function = "i2s0_dout1";
                                phandle = <0xb1>;
                        };
            ir-rx-pin {
                pins = "PH10";
                function = "ir_rx";
                phandle = <0x47>;
            };

            pwm1-pin {
                pins = "PI11";
                function = "pwm1";
                phandle = <0x15>;
            };

            pwm2-pin {
                pins = "PI12";
                function = "pwm2";
                phandle = <0x16>;
            };

            pwm3-pin {
                pins = "PI13";
                function = "pwm3";
                phandle = <0x17>;
            };

            pwm4-pin {
                pins = "PI14";
                function = "pwm4";
                phandle = <0x18>;
            };

            pwm5-pin {
                pins = "PA12";
                function = "pwm5";
                phandle = <0x19>;
            };

            mmc0-pins {
                pins = "PF0\0PF1\0PF2\0PF3\0PF4\0PF5";
                function = "mmc0";
                drive-strength = <0x28>;
                bias-pull-up;
                phandle = <0x1a>;
            };

            mmc1-pins {
                pins = "PG0\0PG1\0PG2\0PG3\0PG4\0PG5";
                function = "mmc1";
                drive-strength = <0x28>;
                bias-pull-up;
                phandle = <0x1c>;
            };

            mmc2-pins {
                pins = "PC0\0PC1\0PC5\0PC6\0PC8\0PC9\0PC10\0PC11\0PC13\0PC14\0PC15\0PC16";
                function = "mmc2";
                drive-strength = <0x1e>;
                bias-pull-up;
                phandle = <0x20>;
            };

            spi0-pins {
                pins = "PC0\0PC2\0PC4";
                function = "spi0";
                phandle = <0x2d>;
            };

            spi1-pins {
                pins = "PH6\0PH7\0PH8";
                function = "spi1";
                phandle = <0x2e>;
            };

            spi1-cs-pin {
                pins = "PH9";
                function = "spi1";
                phandle = <0x5d>;
            };

            uart0-ph-pins {
                pins = "PH0\0PH1";
                function = "uart0";
                phandle = <0x27>;
            };

            uart1-pins {
                pins = "PG6\0PG7";
                function = "uart1";
                phandle = <0x5e>;
            };

            uart1-rts-cts-pins {
                pins = "PG8\0PG9";
                function = "uart1";
                phandle = <0x5f>;
            };

            uart2-ph-pins {
                pins = "PH5\0PH6";
                function = "uart2";
                phandle = <0x60>;
            };

            uart2-rts-cts-pins {
                pins = "PH7\0PH8";
                function = "uart2";
                phandle = <0x61>;
            };

            uart5-ph-pins {
                pins = "PH2\0PH3";
                function = "uart5";
                phandle = <0x62>;
            };
                        status-led-pin {
                                pins = "PC13";
                                function = "gpio_out";
                                phandle = <0xa0>;
                        };
        };

        interrupt-controller@3021000 {
            compatible = "arm,gic-400";
            reg = <0x3021000 0x1000 0x3022000 0x2000 0x3024000 0x2000 0x3026000 0x2000>;
            interrupts = <0x01 0x09 0xf04>;
            interrupt-controller;
            #interrupt-cells = <0x03>;
            phandle = <0x01>;
        };

        mmc@4020000 {
            compatible = "allwinner,sun50i-h616-mmc\0allwinner,sun50i-a100-mmc";
            reg = <0x4020000 0x1000>;
            clocks = <0x02 0x3f 0x02 0x3c>;
            clock-names = "ahb\0mmc";
            resets = <0x02 0x0e>;
            reset-names = "ahb";
            interrupts = <0x00 0x23 0x04>;
            pinctrl-names = "default";
            pinctrl-0 = <0x1a>;
            status = "okay";
            max-frequency = <0x2faf080>;
            cap-sd-highspeed;
            cap-mmc-highspeed;
            mmc-ddr-3_3v;
            mmc-ddr-1_8v;
            cap-sdio-irq;
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            vmmc-supply = <0x1b>;
            no-1-8-v;
            bus-width = <0x04>;
            phandle = <0x63>;
        };

        mmc@4021000 {
            compatible = "allwinner,sun50i-h616-mmc\0allwinner,sun50i-a100-mmc";
            reg = <0x4021000 0x1000>;
            clocks = <0x02 0x40 0x02 0x3d>;
            clock-names = "ahb\0mmc";
            resets = <0x02 0x0f>;
            reset-names = "ahb";
            interrupts = <0x00 0x24 0x04>;
            pinctrl-names = "default";
            pinctrl-0 = <0x1c>;
            status = "okay";
            max-frequency = <0x17d7840>;
            cap-sd-highspeed;
            cap-mmc-highspeed;
            mmc-ddr-3_3v;
            mmc-ddr-1_8v;
            cap-sdio-irq;
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            vmmc-supply = <0x1d>;
            vqmmc-supply = <0x1e>;
            mmc-pwrseq = <0x1f>;
            bus-width = <0x04>;
            non-removable;
            phandle = <0x64>;
        };

        mmc@4022000 {
            compatible = "allwinner,sun50i-h616-emmc\0allwinner,sun50i-a100-emmc";
            reg = <0x4022000 0x1000>;
            clocks = <0x02 0x41 0x02 0x3e>;
            clock-names = "ahb\0mmc";
            resets = <0x02 0x10>;
            reset-names = "ahb";
            interrupts = <0x00 0x25 0x04>;
            pinctrl-names = "default";
            pinctrl-0 = <0x20>;
            status = "disabled";
            max-frequency = <0x7270e00>;
            cap-sd-highspeed;
            cap-mmc-highspeed;
            mmc-ddr-3_3v;
            mmc-ddr-1_8v;
            cap-sdio-irq;
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            vmmc-supply = <0x1b>;
            no-1-8-v;
            bus-width = <0x08>;
            non-removable;
            phandle = <0x65>;
        };

        dma-controller@3002000 {
            compatible = "allwinner,sun50i-h616-dma";
            reg = <0x3002000 0x1000>;
            interrupts = <0x00 0x2a 0x04>;
            clocks = <0x02 0x2a 0x02 0x32>;
            clock-names = "bus\0mbus";
            dma-channels = <0x10>;
            dma-requests = <0x31>;
            resets = <0x02 0x06>;
            #dma-cells = <0x01>;
            phandle = <0x21>;
        };

        codec@05096000 {
            #sound-dai-cells = <0x00>;
            compatible = "allwinner,sun50i-h616-codec";
            reg = <0x5096000 0x31c>;
            interrupts = <0x00 0x3a 0x04>;
            clocks = <0x02 0x5d 0x02 0x5b 0x02 0x5c>;
            clock-names = "apb\0audio-codec-1x\0audio-codec-4x";
            resets = <0x02 0x24>;
            dmas = <0x21 0x06>;
            dma-names = "tx";
            status = "okay";
            allwinner,audio-routing = "Line Out\0LINEOUT";
            phandle = <0x66>;
        };

        ahub_codec@0x05097000 {
            compatible = "allwinner,sunxi-ahub";
            reg = <0x5097000 0xadf>;
            clocks = <0x02 0x5f 0x02 0x5b 0x02 0x5c 0x02 0x5e>;
            clock-names = "apb\0audio-codec-1x\0audio-codec-4x\0audio-hub";
            resets = <0x02 0x25>;
            status = "okay";
            phandle = <0x25>;
        };

        cpudai0-controller@0x05097000 {
            compatible = "allwinner,sunxi-ahub-cpudai";
            reg = <0x5097000 0xadf>;
            id = <0x00>;
            dmas = <0x21 0x03 0x21 0x03>;
            dma-names = "rx\0tx";
            status = "okay";
            phandle = <0x22>;
        };

        cpudai1-controller@0x05097000 {
            compatible = "allwinner,sunxi-ahub-cpudai";
            reg = <0x5097000 0xadf>;
            id = <0x01>;
            dmas = <0x21 0x04 0x21 0x04>;
            dma-names = "rx\0tx";
            status = "okay";
            phandle = <0x23>;
        };

        cpudai2-controller@0x05097000 {
            compatible = "allwinner,sunxi-ahub-cpudai";
            reg = <0x5097000 0xadf>;
            id = <0x02>;
            dmas = <0x21 0x05 0x21 0x05>;
            dma-names = "rx\0tx";
            status = "okay";
            phandle = <0x24>;
        };

        sound@0 {
            compatible = "allwinner,sunxi-ahub-machine";
            sunxi,cpudai-controller0 = <0x22>;
            sunxi,cpudai-controller1 = <0x23>;
            sunxi,cpudai-controller2 = <0x24>;
            sunxi,audio-codec = <0x25>;
            status = "okay";
            phandle = <0x67>;
        };

        ahub-i2s1@0x05097000 {
            #sound-dai-cells = <0x00>;
            compatible = "allwinner,sunxi-ahub-daudio";
            reg = <0x5097000 0xadf>;
            clocks = <0x02 0x5f 0x02 0x5b 0x02 0x5c 0x02 0x5e>;
            clock-names = "apb\0audio-codec-1x\0audio-codec-4x\0audio-hub";
            tdm_num = <0x01>;
            pinconfig = <0x00>;
            frametype = <0x00>;
            pcm_lrck_period = <0x20>;
            slot_width_select = <0x20>;
            daudio_master = <0x04>;
            audio_format = <0x01>;
            signal_inversion = <0x01>;
            tdm_config = <0x01>;
            mclk_div = <0x01>;
            status = "okay";
            phandle = <0x3c>;
        };

        ahub-i2s0@0x05097000 {
            compatible = "allwinner,sunxi-ahub-daudio";
            reg = <0x5097000 0xadf>;
            clocks = <0x02 0x5f 0x02 0x5b 0x02 0x5c 0x02 0x5e>;
            clock-names = "apb\0audio-codec-1x\0audio-codec-4x\0audio-hub";
            pinctrl-names = "default","default","default";
            pinctrl-0 = <0x26>;
                        pinctrl-1 = <0xb0>;
                        pinctrl-2 = <0xb1>;
            tdm_num = <0x03>;
            pinconfig = <0x01>;
            frametype = <0x00>;
            pcm_lrck_period = <0x20>;
            slot_width_select = <0x20>;
            daudio_master = <0x04>;
            audio_format = <0x01>;
            signal_inversion = <0x01>;
            tdm_config = <0x01>;
            mclk_div = <0x04>;
            status = "okay";
            phandle = <0x68>;
        };

        serial@5000000 {
            compatible = "snps,dw-apb-uart";
            reg = <0x5000000 0x400>;
            interrupts = <0x00 0x00 0x04>;
            reg-shift = <0x02>;
            reg-io-width = <0x04>;
            clocks = <0x02 0x42>;
            resets = <0x02 0x11>;
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <0x27>;
            phandle = <0x69>;
        };

        serial@5000400 {
            compatible = "snps,dw-apb-uart";
            reg = <0x5000400 0x400>;
            interrupts = <0x00 0x01 0x04>;
            reg-shift = <0x02>;
            reg-io-width = <0x04>;
            clocks = <0x02 0x43>;
            resets = <0x02 0x12>;
            status = "disabled";
            phandle = <0x6a>;
        };

        serial@5000800 {
            compatible = "snps,dw-apb-uart";
            reg = <0x5000800 0x400>;
            interrupts = <0x00 0x02 0x04>;
            reg-shift = <0x02>;
            reg-io-width = <0x04>;
            clocks = <0x02 0x44>;
            resets = <0x02 0x13>;
            status = "disabled";
            phandle = <0x6b>;
        };

        serial@5000c00 {
            compatible = "snps,dw-apb-uart";
            reg = <0x5000c00 0x400>;
            interrupts = <0x00 0x03 0x04>;
            reg-shift = <0x02>;
            reg-io-width = <0x04>;
            clocks = <0x02 0x45>;
            resets = <0x02 0x14>;
            status = "disabled";
            phandle = <0x6c>;
        };

        serial@5001000 {
            compatible = "snps,dw-apb-uart";
            reg = <0x5001000 0x400>;
            interrupts = <0x00 0x04 0x04>;
            reg-shift = <0x02>;
            reg-io-width = <0x04>;
            clocks = <0x02 0x46>;
            resets = <0x02 0x15>;
            status = "disabled";
            phandle = <0x6d>;
        };

        serial@5001400 {
            compatible = "snps,dw-apb-uart";
            reg = <0x5001400 0x400>;
            interrupts = <0x00 0x05 0x04>;
            reg-shift = <0x02>;
            reg-io-width = <0x04>;
            clocks = <0x02 0x47>;
            resets = <0x02 0x16>;
            status = "disabled";
            phandle = <0x6e>;
        };

        i2c@5002000 {
            compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun6i-a31-i2c";
            reg = <0x5002000 0x400>;
            interrupts = <0x00 0x06 0x04>;
            clocks = <0x02 0x48>;
            resets = <0x02 0x17>;
            pinctrl-names = "default";
            pinctrl-0 = <0x28>;
            status = "disabled";
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            phandle = <0x6f>;
        };

        i2c@5002400 {
            compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun6i-a31-i2c";
            reg = <0x5002400 0x400>;
            interrupts = <0x00 0x07 0x04>;
            clocks = <0x02 0x49>;
            resets = <0x02 0x18>;
            pinctrl-names = "default";
            pinctrl-0 = <0x29>;
            status = "okay";
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            phandle = <0x70>;
        };

        i2c@5002800 {
            compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun6i-a31-i2c";
            reg = <0x5002800 0x400>;
            interrupts = <0x00 0x08 0x04>;
            clocks = <0x02 0x4a>;
            resets = <0x02 0x19>;
            pinctrl-names = "default";
            pinctrl-0 = <0x2a>;
            status = "okay";
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            phandle = <0x71>;
        };

        i2c@5002c00 {
            compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun6i-a31-i2c";
            reg = <0x5002c00 0x400>;
            interrupts = <0x00 0x09 0x04>;
            clocks = <0x02 0x4b>;
            resets = <0x02 0x1a>;
            pinctrl-names = "default";
            pinctrl-0 = <0x2b>;
            status = "disabled";
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            phandle = <0x72>;
        };

        i2c@5003000 {
            compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun6i-a31-i2c";
            reg = <0x5003000 0x400>;
            interrupts = <0x00 0x0a 0x04>;
            clocks = <0x02 0x4c>;
            resets = <0x02 0x1b>;
            pinctrl-names = "default";
            pinctrl-0 = <0x2c>;
            status = "disabled";
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            phandle = <0x73>;
        };

        spi@5010000 {
            compatible = "allwinner,sun50i-h616-spi\0allwinner,sun8i-h3-spi";
            reg = <0x5010000 0x1000>;
            interrupts = <0x00 0x0c 0x04>;
            clocks = <0x02 0x4f 0x02 0x4d>;
            clock-names = "ahb\0mod";
            resets = <0x02 0x1c>;
            pinctrl-names = "default";
            pinctrl-0 = <0x2d>;
            dmas = <0x21 0x16 0x21 0x16>;
            dma-names = "rx\0tx";
            status = "disabled";
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            phandle = <0x74>;
        };

        spi@5011000 {
            compatible = "allwinner,sun50i-h616-spi\0allwinner,sun8i-h3-spi";
            reg = <0x5011000 0x1000>;
            interrupts = <0x00 0x0d 0x04>;
            clocks = <0x02 0x50 0x02 0x4e>;
            clock-names = "ahb\0mod";
            resets = <0x02 0x1d>;
            pinctrl-names = "default";
            pinctrl-0 = <0x31 0x32>;
            dmas = <0x22 0x17 0x22 0x17>;
            dma-names = "rx\0tx";
            status = "okay";
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            phandle = <0x75>;

                        spidev@ {
                               compatible = "rohm,dh2228fv";
                               status = "okay";
                               reg = <0x01>;
                               spi-max-frequency = <0xf4240>;
            };
/*
            mcp2515@0 {
                compatible = "microchip,mcp2515";
                clocks = <0x30>;
                status = "disabled";
                reg = <0x00>;
                spi-max-frequency = <0xf4240>;
                interrupt-parent = <0x2f>;
                interrupts = <0x02 0x09 0x02>;
                vdd-supply = <0x1d>;
                xceiver-supply = <0x1d>;
                phandle = <0x76>;
            };

            st7796@1 {
                compatible = "sitronix,st7796";
                status = "disabled";
                reg = <0x01>;
                spi-max-frequency = <0x2faf080>;
                fps = <0x3c>;
                rotate = <0x00>;
                buswidth = <0x08>;
                width = <0x1e0>;
                height = <0x140>;
                bpp = <0x18>;
                bgr;
                regwidth = <0x08>;
                debug = <0x00>;
                phandle = <0x77>; 
            };     */
        };

        ethernet@5020000 {
            compatible = "allwinner,sun50i-h616-emac\0allwinner,sun50i-a64-emac";
            syscon = <0x31>;
            reg = <0x5020000 0x10000>;
            interrupts = <0x00 0x0e 0x04>;
            interrupt-names = "macirq";
            resets = <0x02 0x1e>;
            reset-names = "stmmaceth";
            clocks = <0x02 0x52>;
            clock-names = "stmmaceth";
            status = "disabled";
            pinctrl-names = "default";
            pinctrl-0 = <0x32>;
            phy-mode = "rgmii";
            phy-handle = <0x33>;
            phy-supply = <0x1b>;
            allwinner,rx-delay-ps = <0xc1c>;
            allwinner,tx-delay-ps = <0x2bc>;
            phandle = <0x78>;

            mdio {
                compatible = "snps,dwmac-mdio";
                #address-cells = <0x01>;
                #size-cells = <0x00>;
                phandle = <0x79>;

                ethernet-phy@1 {
                    compatible = "ethernet-phy-ieee802.3-c22";
                    reg = <0x01>;
                    phandle = <0x33>;
                };
            };
        };

        ethernet@5030000 {
            compatible = "allwinner,sunxi-gmac";
            reg = <0x5030000 0x10000 0x3000034 0x04>;
            reg-names = "gmac1_reg\0ephy_reg";
            interrupts = <0x00 0x0f 0x04>;
            interrupt-names = "gmacirq";
            resets = <0x02 0x1f>;
            reset-names = "stmmaceth";
            clocks = <0x02 0x53 0x02 0x51>;
            clock-names = "bus-emac1\0emac-25m";
            pinctrl-0 = <0x34>;
            pinctrl-names = "default";
            phy-mode = "rmii";
            tx-delay = <0x07>;
            rx-delay = <0x1f>;
            phy-rst;
            gmac-power0;
            gmac-power1;
            gmac-power2;
            status = "okay";
            phy-handle = <0x35>;
            phy-supply = <0x1b>;
            allwinner,rx-delay-ps = <0xc1c>;
            allwinner,tx-delay-ps = <0x2bc>;
            phandle = <0x7a>;

            mdio {
                compatible = "ethernet-phy-ieee802.3-c22";
                #address-cells = <0x01>;
                #size-cells = <0x00>;
                phandle = <0x7b>;

                ethernet-phy@1 {
                    compatible = "ethernet-phy-ieee802.3-c22";
                    reg = <0x01>;
                    phandle = <0x35>;
                };
            };
        };

        usb@5100000 {
            compatible = "allwinner,sun50i-h616-musb\0allwinner,sun8i-h3-musb";
            reg = <0x5100000 0x400>;
            clocks = <0x02 0x70>;
            resets = <0x02 0x32>;
            interrupts = <0x00 0x19 0x04>;
            interrupt-names = "mc";
            phys = <0x36 0x00>;
            phy-names = "usb";
            extcon = <0x36 0x00>;
            status = "okay";
            dr_mode = "peripheral";
            phandle = <0x7c>;
        };

        phy@5100400 {
            compatible = "allwinner,sun50i-h616-usb-phy";
            reg = <0x5100400 0x24 0x5101800 0x14 0x5200800 0x14 0x5310800 0x14 0x5311800 0x14>;
            reg-names = "phy_ctrl\0pmu0\0pmu1\0pmu2\0pmu3";
            clocks = <0x02 0x61 0x02 0x63 0x02 0x65 0x02 0x67 0x02 0x6e>;
            clock-names = "usb0_phy\0usb1_phy\0usb2_phy\0usb3_phy\0pmu2_clk";
            resets = <0x02 0x26 0x02 0x27 0x02 0x28 0x02 0x29>;
            reset-names = "usb0_reset\0usb1_reset\0usb2_reset\0usb3_reset";
            status = "okay";
            #phy-cells = <0x01>;
            usb1_vbus-supply = <0x37>;
            phandle = <0x36>;
        };

        usb@5101000 {
            compatible = "allwinner,sun50i-h616-ehci\0generic-ehci";
            reg = <0x5101000 0x100>;
            interrupts = <0x00 0x1a 0x04>;
            clocks = <0x02 0x68 0x02 0x6c 0x02 0x60 0x02 0x65>;
            resets = <0x02 0x2a 0x02 0x2e 0x02 0x28>;
            phys = <0x36 0x00>;
            phy-names = "usb";
            status = "okay";
            phandle = <0x7d>;
        };

        usb@5101400 {
            compatible = "allwinner,sun50i-h616-ohci\0generic-ohci";
            reg = <0x5101400 0x100>;
            interrupts = <0x00 0x1b 0x04>;
            clocks = <0x02 0x68 0x02 0x60 0x02 0x65>;
            resets = <0x02 0x2a 0x02 0x28>;
            phys = <0x36 0x00>;
            phy-names = "usb";
            status = "okay";
            phandle = <0x7e>;
        };

        usb@5200000 {
            compatible = "allwinner,sun50i-h616-ehci\0generic-ehci";
            reg = <0x5200000 0x100>;
            interrupts = <0x00 0x1c 0x04>;
            clocks = <0x02 0x69 0x02 0x6d 0x02 0x62 0x02 0x65>;
            resets = <0x02 0x2b 0x02 0x2f 0x02 0x28>;
            phys = <0x36 0x01>;
            phy-names = "usb";
            status = "okay";
            phandle = <0x7f>;
        };

        usb@5200400 {
            compatible = "allwinner,sun50i-h616-ohci\0generic-ohci";
            reg = <0x5200400 0x100>;
            interrupts = <0x00 0x1d 0x04>;
            clocks = <0x02 0x69 0x02 0x62 0x02 0x65>;
            resets = <0x02 0x2b 0x02 0x28>;
            phys = <0x36 0x01>;
            phy-names = "usb";
            status = "okay";
            phandle = <0x80>;
        };

        usb@5310000 {
            compatible = "allwinner,sun50i-h616-ehci\0generic-ehci";
            reg = <0x5310000 0x100>;
            interrupts = <0x00 0x1e 0x04>;
            clocks = <0x02 0x6a 0x02 0x6e 0x02 0x64>;
            resets = <0x02 0x2c 0x02 0x30>;
            phys = <0x36 0x02>;
            phy-names = "usb";
            status = "okay";
            phandle = <0x81>;
        };

        usb@5310400 {
            compatible = "allwinner,sun50i-h616-ohci\0generic-ohci";
            reg = <0x5310400 0x100>;
            interrupts = <0x00 0x1f 0x04>;
            clocks = <0x02 0x6a 0x02 0x64>;
            resets = <0x02 0x2c>;
            phys = <0x36 0x02>;
            phy-names = "usb";
            status = "okay";
            phandle = <0x82>;
        };

        usb@5311000 {
            compatible = "allwinner,sun50i-h616-ehci\0generic-ehci";
            reg = <0x5311000 0x100>;
            interrupts = <0x00 0x20 0x04>;
            clocks = <0x02 0x6b 0x02 0x6f 0x02 0x66 0x02 0x65>;
            resets = <0x02 0x2d 0x02 0x31 0x02 0x28>;
            phys = <0x36 0x03>;
            phy-names = "usb";
            status = "okay";
            phandle = <0x83>;
        };

        usb@5311400 {
            compatible = "allwinner,sun50i-h616-ohci\0generic-ohci";
            reg = <0x5311400 0x100>;
            interrupts = <0x00 0x21 0x04>;
            clocks = <0x02 0x6b 0x02 0x66 0x02 0x65>;
            resets = <0x02 0x2d 0x02 0x28>;
            phys = <0x36 0x03>;
            phy-names = "usb";
            status = "okay";
            phandle = <0x84>;
        };

        hdmi@6000000 {
            #sound-dai-cells = <0x00>;
            compatible = "allwinner,sun50i-h616-dw-hdmi";
            reg = <0x6000000 0x10000>;
            reg-io-width = <0x01>;
            interrupts = <0x00 0x3f 0x04>;
            clocks = <0x02 0x75 0x02 0x73 0x02 0x72 0x02 0x74 0x02 0x7e 0x02 0x7f>;
            clock-names = "iahb\0isfr\0tmds\0cec\0hdcp\0hdcp-bus";
            resets = <0x02 0x33 0x02 0x3a>;
            reset-names = "ctrl\0hdcp";
            phys = <0x38>;
            phy-names = "phy";
            drive-strength = <0x0a>;
            status = "okay";
            hvcc-supply = <0x39>;
            phandle = <0x85>;

            ports {
                #address-cells = <0x01>;
                #size-cells = <0x00>;

                port@0 {
                    reg = <0x00>;
                    phandle = <0x86>;

                    endpoint {
                        remote-endpoint = <0x3a>;
                        phandle = <0x40>;
                    };
                };

                port@1 {
                    reg = <0x01>;
                    phandle = <0x87>;

                    endpoint {
                        remote-endpoint = <0x3b>;
                        phandle = <0x4f>;
                    };
                };
            };
        };

        hdmi-phy@6010000 {
            compatible = "allwinner,sun50i-h616-hdmi-phy";
            reg = <0x6010000 0x10000>;
            clocks = <0x02 0x75 0x02 0x73>;
            clock-names = "bus\0mod";
            resets = <0x02 0x34>;
            reset-names = "phy";
            #phy-cells = <0x00>;
            phandle = <0x38>;
        };

        hdmi-audio@1 {
            compatible = "allwinner,sunxi-hdmi-machine";
            sunxi,cpudai-controller = <0x3c>;
            sunxi,snddaudio-codec = "hdmi-audio-codec.4.auto";
            status = "okay";
            phandle = <0x88>;
        };

        tcon-top@6510000 {
            compatible = "allwinner,sun50i-h616-tcon-top";
            reg = <0x6510000 0x1000>;
            clocks = <0x02 0x76 0x02 0x77>;
            clock-names = "bus\0tcon-tv0";
            clock-output-names = "tcon-top-tv0";
            resets = <0x02 0x35>;
            #clock-cells = <0x01>;
            phandle = <0x43>;

            ports {
                #address-cells = <0x01>;
                #size-cells = <0x00>;

                port@0 {
                    #address-cells = <0x01>;
                    #size-cells = <0x00>;
                    reg = <0x00>;
                    phandle = <0x89>;

                    endpoint@0 {
                        reg = <0x00>;
                        remote-endpoint = <0x3d>;
                        phandle = <0x0c>;
                    };
                };

                port@1 {
                    #address-cells = <0x01>;
                    #size-cells = <0x00>;
                    reg = <0x01>;
                    phandle = <0x8a>;

                    endpoint@2 {
                        reg = <0x02>;
                        remote-endpoint = <0x3e>;
                        phandle = <0x44>;
                    };
                };

                port@4 {
                    #address-cells = <0x01>;
                    #size-cells = <0x00>;
                    reg = <0x04>;
                    phandle = <0x8b>;

                    endpoint@0 {
                        reg = <0x00>;
                        remote-endpoint = <0x3f>;
                        phandle = <0x45>;
                    };
                };

                port@5 {
                    reg = <0x05>;
                    phandle = <0x8c>;

                    endpoint {
                        remote-endpoint = <0x40>;
                        phandle = <0x3a>;
                    };
                };
            };
        };

        video-codec@1c0e000 {
            compatible = "allwinner,sun50i-h616-video-engine";
            reg = <0x1c0e000 0x2000>;
            clocks = <0x02 0x29 0x02 0x28 0x02 0x33>;
            clock-names = "ahb\0mod\0ram";
            resets = <0x02 0x05>;
            interrupts = <0x00 0x5d 0x04>;
            allwinner,sram = <0x41 0x01>;
        };

        gpu@0x01800000 {
            compatible = "allwinner,sun50i-h616-mali\0arm,mali-bifrost";
            reg = <0x1800000 0x40000>;
            interrupt-parent = <0x01>;
            interrupts = <0x00 0x5f 0x04 0x00 0x60 0x04 0x00 0x61 0x04>;
            interrupt-names = "job\0mmu\0gpu";
            clocks = <0x02 0x23 0x02 0x24>;
            clock-names = "core\0bus";
            resets = <0x02 0x03>;
            status = "okay";
            mali-supply = <0x42>;
            phandle = <0x8d>;
        };

        lcd-controller@6515000 {
            compatible = "allwinner,sun50i-h616-tcon-tv";
            reg = <0x6515000 0x1000>;
            interrupts = <0x00 0x42 0x04>;
            clocks = <0x02 0x79 0x43 0x00>;
            clock-names = "ahb\0tcon-ch1";
            resets = <0x02 0x36>;
            reset-names = "lcd";
            phandle = <0x8e>;

            ports {
                #address-cells = <0x01>;
                #size-cells = <0x00>;

                port@0 {
                    reg = <0x00>;
                    phandle = <0x8f>;

                    endpoint {
                        remote-endpoint = <0x44>;
                        phandle = <0x3e>;
                    };
                };

                port@1 {
                    #address-cells = <0x01>;
                    #size-cells = <0x00>;
                    reg = <0x01>;
                    phandle = <0x90>;

                    endpoint@1 {
                        reg = <0x01>;
                        remote-endpoint = <0x45>;
                        phandle = <0x3f>;
                    };
                };
            };
        };

        rtc@7000000 {
            compatible = "allwinner,sun50i-h616-rtc\0allwinner,sun50i-h6-rtc";
            reg = <0x7000000 0x400>;
            interrupts = <0x00 0x65 0x04 0x00 0x66 0x04>;
            clock-output-names = "osc32k\0osc32k-out\0iosc";
            #clock-cells = <0x01>;
            phandle = <0x0e>;
        };

        clock@7010000 {
            compatible = "allwinner,sun50i-h616-r-ccu";
            reg = <0x7010000 0x210>;
            clocks = <0x0d 0x0e 0x00 0x0e 0x02 0x02 0x04>;
            clock-names = "hosc\0losc\0iosc\0pll-periph";
            #clock-cells = <0x01>;
            #reset-cells = <0x01>;
            phandle = <0x46>;
        };

        pinctrl@7022000 {
            compatible = "allwinner,sun50i-h616-r-pinctrl";
            reg = <0x7022000 0x400>;
            interrupts = <0x00 0x2b 0x04>;
            clocks = <0x46 0x02 0x0d 0x0e 0x00>;
            clock-names = "apb\0hosc\0losc";
            gpio-controller;
            #gpio-cells = <0x03>;
            interrupt-controller;
            #interrupt-cells = <0x03>;
            phandle = <0x91>;

            r-i2c-pins {
                pins = "PL0\0PL1";
                function = "s_i2c";
                phandle = <0x92>;
            };

            r-rsb-pins {
                pins = "PL0\0PL1";
                function = "s_rsb";
                phandle = <0x48>;
            };
        };

        ir@7040000 {
            compatible = "allwinner,sun50i-h616-ir\0allwinner,sun6i-a31-ir";
            reg = <0x7040000 0x400>;
            interrupts = <0x00 0x6a 0x04>;
            clocks = <0x46 0x09 0x46 0x0b>;
            clock-names = "apb\0ir";
            resets = <0x46 0x05>;
            pinctrl-names = "default";
            pinctrl-0 = <0x47>;
            status = "okay";
            phandle = <0x93>;
        };

        i2c@7081400 {
            compatible = "allwinner,sun50i-h616-i2c\0allwinner,sun6i-a31-i2c";
            reg = <0x7081400 0x400>;
            interrupts = <0x00 0x69 0x04>;
            clocks = <0x46 0x08>;
            resets = <0x46 0x04>;
            status = "okay";
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            phandle = <0x94>;

            pmic@36 {
                compatible = "x-powers,axp1530";
                status = "okay";
                reg = <0x36>;
                wakeup-source;
                phandle = <0x95>;

                standby_param {
                    vcc-dram = <0x04>;
                    phandle = <0x96>;
                };

                regulators {

                    dcdc1 {
                        regulator-name = "axp1530-dcdc1";
                        regulator-min-microvolt = <0x7a120>;
                        regulator-max-microvolt = <0x33e140>;
                        regulator-step-delay-us = <0x19>;
                        regulator-final-delay-us = <0x32>;
                        regulator-always-on;
                        phandle = <0x97>;
                    };

                    dcdc2 {
                        regulator-name = "axp1530-dcdc2";
                        regulator-min-microvolt = <0x7a120>;
                        regulator-max-microvolt = <0x177fa0>;
                        regulator-step-delay-us = <0x19>;
                        regulator-final-delay-us = <0x32>;
                        regulator-ramp-delay = <0xc8>;
                        regulator-always-on;
                        phandle = <0x04>;
                    };

                    dcdc3 {
                        regulator-name = "axp1530-dcdc3";
                        regulator-min-microvolt = <0x7a120>;
                        regulator-max-microvolt = <0x1c1380>;
                        regulator-step-delay-us = <0x19>;
                        regulator-final-delay-us = <0x32>;
                        regulator-always-on;
                        phandle = <0x42>;
                    };

                    ldo1 {
                        regulator-name = "axp1530-aldo1";
                        regulator-min-microvolt = <0x1b7740>;
                        regulator-max-microvolt = <0x1b7740>;
                        regulator-step-delay-us = <0x19>;
                        regulator-final-delay-us = <0x32>;
                        regulator-always-on;
                        phandle = <0x39>;
                    };

                    ldo2 {
                        regulator-name = "axp1530-dldo1";
                        regulator-min-microvolt = <0x325aa0>;
                        regulator-max-microvolt = <0x325aa0>;
                        regulator-step-delay-us = <0x19>;
                        regulator-final-delay-us = <0x32>;
                        regulator-always-on;
                        phandle = <0x1b>;
                    };
                };
            };
        };

        rsb@7083000 {
            compatible = "allwinner,sun50i-h616-rsb\0allwinner,sun8i-a23-rsb";
            reg = <0x7083000 0x400>;
            interrupts = <0x00 0x6d 0x04>;
            clocks = <0x46 0x0d>;
            clock-frequency = <0x2dc6c0>;
            resets = <0x46 0x07>;
            pinctrl-names = "default";
            pinctrl-0 = <0x48>;
            status = "disabled";
            #address-cells = <0x01>;
            #size-cells = <0x00>;
            phandle = <0x98>;
        };

        thermal-sensor@5070400 {
            compatible = "allwinner,sun50i-h616-ths";
            reg = <0x5070400 0x400>;
            interrupts = <0x00 0x13 0x04>;
            clocks = <0x02 0x56>;
            clock-names = "bus";
            resets = <0x02 0x21>;
            nvmem-cells = <0x49>;
            nvmem-cell-names = "calibration";
            #thermal-sensor-cells = <0x01>;
            phandle = <0x4a>;
        };

        dump_reg@20000 {
            compatible = "allwinner,sunxi-dump-reg";
            reg = <0x00 0x3001000 0x00 0xf20>;
            status = "okay";
            phandle = <0x99>;
        };

        sunxi-info {
            compatible = "allwinner,sun50i-h616-sys-info";
            status = "okay";
        };

        addr-mgt {
            compatible = "allwinner,sunxi-addr_mgt";
            type_addr_wifi = <0x02>;
            type_addr_bt = <0x02>;
            type_addr_eth = <0x02>;
            status = "okay";
            phandle = <0x9a>;
        };
    };

    thermal-zones {

        cpu-thermal {
            polling-delay-passive = <0x1f4>;
            polling-delay = <0x3e8>;
            thermal-sensors = <0x4a 0x02>;

            trips {

                cpu_warm {
                    temperature = <0x124f8>;
                    hysteresis = <0x7d0>;
                    type = "passive";
                    phandle = <0x4b>;
                };

                cpu_hot_pre {
                    temperature = <0x13880>;
                    hysteresis = <0x7d0>;
                    type = "passive";
                    phandle = <0x4c>;
                };

                cpu_hot {
                    temperature = <0x14c08>;
                    hysteresis = <0x7d0>;
                    type = "passive";
                    phandle = <0x4d>;
                };

                cpu_very_hot {
                    temperature = <0x15f90>;
                    hysteresis = <0x7d0>;
                    type = "passive";
                    phandle = <0x4e>;
                };

                cpu_crit {
                    temperature = <0x19a28>;
                    hysteresis = <0x7d0>;
                    type = "critical";
                    phandle = <0x9b>;
                };
            };

            cooling-maps {

                cpu_warm_limit_cpu {
                    trip = <0x4b>;
                    cooling-device = <0x06 0xffffffff 0x02>;
                };

                cpu_hot_pre_limit_cpu {
                    trip = <0x4c>;
                    cooling-device = <0x06 0x02 0x03>;
                };

                cpu_hot_limit_cpu {
                    trip = <0x4d>;
                    cooling-device = <0x06 0x03 0x04>;
                };

                cpu_very_hot_limit_cpu {
                    trip = <0x4e>;
                    cooling-device = <0x06 0x05 0xffffffff>;
                };
            };
        };

        gpu-thermal {
            polling-delay-passive = <0x00>;
            polling-delay = <0x00>;
            thermal-sensors = <0x4a 0x00>;
        };

        ve-thermal {
            polling-delay-passive = <0x00>;
            polling-delay = <0x00>;
            thermal-sensors = <0x4a 0x01>;
        };

        ddr-thermal {
            polling-delay-passive = <0x00>;
            polling-delay = <0x00>;
            thermal-sensors = <0x4a 0x03>;
        };
    };

    opp-table-cpu {
        compatible = "operating-points-v2";
        opp-shared;
        phandle = <0x03>;

        opp-480000000 {
            opp-hz = <0x00 0x1c9c3800>;
            opp-microvolt = <0xc8320>;
            clock-latency-ns = <0x3b9b0>;
        };

        opp-600000000 {
            opp-hz = <0x00 0x23c34600>;
            opp-microvolt = <0xc8320>;
            clock-latency-ns = <0x3b9b0>;
        };

        opp-792000000 {
            opp-hz = <0x00 0x2f34f600>;
            opp-microvolt = <0xd1f60>;
            clock-latency-ns = <0x3b9b0>;
        };

        opp-1008000000 {
            opp-hz = <0x00 0x3c14dc00>;
            opp-microvolt = <0xdbba0>;
            clock-latency-ns = <0x3b9b0>;
        };

        opp-1200000000 {
            opp-hz = <0x00 0x47868c00>;
            opp-microvolt = <0xea600>;
            clock-latency-ns = <0x3b9b0>;
        };

        opp-1512000000 {
            opp-hz = <0x00 0x5a1f4a00>;
            opp-microvolt = <0x10c8e0>;
            clock-latency-ns = <0x3b9b0>;
        };
    };

    aliases {
        ethernet0 = "/soc/ethernet@5030000";
        serial0 = "/soc/serial@5000000";
    };

    chosen {
        stdout-path = "serial0:115200n8";
    };

    connector {
        compatible = "hdmi-connector";
        type = [64 00];

        port {

            endpoint {
                remote-endpoint = <0x4f>;
                phandle = <0x3b>;
            };
        };
    };

    leds {
        compatible = "gpio-leds";

        led-0 {
            function = "power";
            color = <0x01>;
            gpios = <0x2f 0x02 0x0d 0x00>;
            status = "disabled";
        };

        led-1 {
            function = "status";
            color = <0x02>;
            gpio = <0x2f 0x07 0x05 0x00>;
            default-state = "on";
            status = "disabled";
        };
/*  TBD
       gpios = <0x14 0x0 0x1>:
       0x14: phandle of GPIO Controller
       search GPIO controller node with phandle = <0x14> in your dts file
       0x0 : GPIO pin number in the controller
       not a serial number including other controllers
       0x1 : GPIO flag

       Bit 0 express polarity
         GPIO_ACTIVE_HIGH =  0, GPIO_ACTIVE_LOW = 1
       Bit 1 express single-endedness
         GPIO_PUSH_PULL = 0, GPIO_SINGLE_ENDED = 2
       Bit 2 express Open drain or open source 
         GPIO_LINE_OPEN_SOURCE = 0, GPIO_LINE_OPEN_DRAIN = 4 

       Open Drain/Collector is the combination of single-ended open drain interface.
       Open Source/Emitter is the combination of single-ended open source interface.

         GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN)
         GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE)

       Bit 3 express GPIO suspend/resume and reset persistence
         GPIO_PERSISTENT = 0, GPIO_TRANSITORY = 8
       Bit 4 express pull up 
         GPIO_PULL_UP = 16
       Bit 5 express pull down
         GPIO_PULL_DOWN = 32
*/

        led-2 {
                       function = "status";
                       gpio = <0x2f 0x1b 0x01>;
                       default-state = "on";
                       status = "okay";
        };

        gpio_1 {
            function = "wifi_power";
            gpio = <0x2f 0x05 0x06 0x01>;
            status = "disabled";
        };

        gpio_2 {
            function = "wifi_wake";
            gpio = <0x2f 0x06 0x0f 0x01>;
            status = "okay";
        };
    };

    ws2812 {
        compatible = "rgb-ws2812";
        pinctrl-names = "default";
        status = "okay";

        ws2812_pin@0 {
            gpios = <0x2f 0x02 0x0e 0x01>;
            label = "ws2812";
            linux,default-trigger = "heartbeat";
            linux,default-trigger-delay-ms = <0x00>;
        };
    };

    mcp2515_clock {
        compatible = "fixed-clock";
        #clock-cells = <0x00>;
        clock-frequency = <0xb71b00>;
        phandle = <0x30>;
    };

    i2c-gpio {
        #address-cells = <0x01>;
        #size-cells = <0x00>;
        compatible = "i2c-gpio";
        status = "okay";
        gpios = <0x2f 0x02 0x0c 0x00 0x2f 0x02 0x0a 0x00>;
        i2c-gpio,delay-us = <0x05>;
        phandle = <0x9c>;

        ns2009@48 {
            compatible = "ns2009";
            reg = <0x48>;
            status = "disabled";
            phandle = <0x9d>;
        };

        bh1750@5c {
            compatible = "rohm,bh1750";
            reg = <0x5c>;
            status = "disabled";
            phandle = <0x9e>;
        };
    };

    vcc5v {
        compatible = "regulator-fixed";
        regulator-name = "vcc-5v";
        regulator-min-microvolt = <0x4c4b40>;
        regulator-max-microvolt = <0x4c4b40>;
        regulator-always-on;
        phandle = <0x50>;
    };

    usb1-vbus {
        compatible = "regulator-fixed";
        regulator-name = "usb1-vbus";
        regulator-min-microvolt = <0x4c4b40>;
        regulator-max-microvolt = <0x4c4b40>;
        vin-supply = <0x50>;
        enable-active-high;
        status = "okay";
        phandle = <0x37>;
    };

    vcc33-wifi {
        compatible = "regulator-fixed";
        regulator-name = "vcc33-wifi";
        regulator-min-microvolt = <0x325aa0>;
        regulator-max-microvolt = <0x325aa0>;
        regulator-always-on;
        vin-supply = <0x50>;
        phandle = <0x1d>;
    };

    vcc-wifi-io {
        compatible = "regulator-fixed";
        regulator-name = "vcc-wifi-io";
        regulator-min-microvolt = <0x1b7740>;
        regulator-max-microvolt = <0x1b7740>;
        regulator-always-on;
        vin-supply = <0x1d>;
        phandle = <0x1e>;
    };

    wifi-pwrseq {
        compatible = "mmc-pwrseq-simple";
        clocks = <0x0e 0x01>;
        clock-names = "osc32k-out";
        reset-gpios = <0x2f 0x06 0x12 0x01>;
        post-power-on-delay-ms = <0xc8>;
        phandle = <0x1f>;
    };

    __symbols__ {
        cpu0 = "/cpus/cpu@0";
        cpu1 = "/cpus/cpu@1";
        cpu2 = "/cpus/cpu@2";
        cpu3 = "/cpus/cpu@3";
        de = "/display-engine";
        secmon_reserved = "/reserved-memory/secmon@40000000";
        osc24M = "/osc24M_clk";
        display_clocks = "/soc/bus@1000000/clock@8000";
        mixer0 = "/soc/bus@1000000/mixer@100000";
        mixer0_out = "/soc/bus@1000000/mixer@100000/ports/port@1";
        mixer0_out_tcon_top_mixer0 = "/soc/bus@1000000/mixer@100000/ports/port@1/endpoint";
        syscon = "/soc/syscon@3000000";
        sram_a2 = "/soc/syscon@3000000/sram@100000";
        scpi_sram = "/soc/syscon@3000000/sram@100000/scpi-sram@17c00";
        sram_c = "/soc/syscon@3000000/sram@28000";
        de3_sram = "/soc/syscon@3000000/sram@28000/sram-section@0";
        sram_c1 = "/soc/syscon@3000000/sram@1a00000";
        ve_sram = "/soc/syscon@3000000/sram@1a00000/sram-section@0";
        ccu = "/soc/clock@3001000";
        sid = "/soc/efuse@3006000";
        cpu_speed_grade = "/soc/efuse@3006000/cpu-speed-grade@00";
        ths_calibration = "/soc/efuse@3006000/thermal-sensor-calibration@14";
        ephy_calibration = "/soc/efuse@3006000/ephy-calibration@2c";
        watchdog = "/soc/watchdog@30090a0";
        pwm = "/soc/pwm@300a000";
        pwm0 = "/soc/pwm0@0300a000";
        pwm1 = "/soc/pwm1@0300a000";
        pwm2 = "/soc/pwm2@0300a000";
        pwm3 = "/soc/pwm3@0300a000";
        pwm4 = "/soc/pwm4@0300a000";
        pwm5 = "/soc/pwm5@0300a000";
        pio = "/soc/pinctrl@300b000";
        ext_rgmii_pins = "/soc/pinctrl@300b000/rgmii-pins";
        rmii_pins = "/soc/pinctrl@300b000/rmii-pins";
        i2c0_pins = "/soc/pinctrl@300b000/i2c0-pins";
        i2c1_pins = "/soc/pinctrl@300b000/i2c1-pins";
        i2c2_pins = "/soc/pinctrl@300b000/i2c2-pins";
        i2c3_pins = "/soc/pinctrl@300b000/i2c3-pins";
        i2c4_pins = "/soc/pinctrl@300b000/i2c4-pins";
        i2s0_pins = "/soc/pinctrl@300b000/i2s0-pins";
                i2s0_in_pins = "/soc/pinctrl@300b000/i2s0-in-pins";
                i2s0_out_pins = "/soc/printctrl@300b000/i2s0-out-pins";
        ir_rx_pin = "/soc/pinctrl@300b000/ir-rx-pin";
        pwm1_pin = "/soc/pinctrl@300b000/pwm1-pin";
        pwm2_pin = "/soc/pinctrl@300b000/pwm2-pin";
        pwm3_pin = "/soc/pinctrl@300b000/pwm3-pin";
        pwm4_pin = "/soc/pinctrl@300b000/pwm4-pin";
        pwm5_pin = "/soc/pinctrl@300b000/pwm5-pin";
        mmc0_pins = "/soc/pinctrl@300b000/mmc0-pins";
        mmc1_pins = "/soc/pinctrl@300b000/mmc1-pins";
        mmc2_pins = "/soc/pinctrl@300b000/mmc2-pins";
        spi0_pins = "/soc/pinctrl@300b000/spi0-pins";
        spi1_pins = "/soc/pinctrl@300b000/spi1-pins";
        spi1_cs_pin = "/soc/pinctrl@300b000/spi1-cs-pin";
        uart0_ph_pins = "/soc/pinctrl@300b000/uart0-ph-pins";
        uart1_pins = "/soc/pinctrl@300b000/uart1-pins";
        uart1_rts_cts_pins = "/soc/pinctrl@300b000/uart1-rts-cts-pins";
        uart2_ph_pins = "/soc/pinctrl@300b000/uart2-ph-pins";
        uart2_rts_cts_pins = "/soc/pinctrl@300b000/uart2-rts-cts-pins";
        uart5_ph_pins = "/soc/pinctrl@300b000/uart5-ph-pins";
                status_led_pin = "/soc/pinctrl@300b00/status-led-pin";
        gic = "/soc/interrupt-controller@3021000";
        mmc0 = "/soc/mmc@4020000";
        mmc1 = "/soc/mmc@4021000";
        mmc2 = "/soc/mmc@4022000";
        dma = "/soc/dma-controller@3002000";
        codec = "/soc/codec@05096000";
        ahub_codec = "/soc/ahub_codec@0x05097000";
        ahub_cpudai0 = "/soc/cpudai0-controller@0x05097000";
        ahub_cpudai1 = "/soc/cpudai1-controller@0x05097000";
        ahub_cpudai2 = "/soc/cpudai2-controller@0x05097000";
        sndahub = "/soc/sound@0";
        ahub_i2s1 = "/soc/ahub-i2s1@0x05097000";
        ahub_i2s0 = "/soc/ahub-i2s0@0x05097000";
        uart0 = "/soc/serial@5000000";
        uart1 = "/soc/serial@5000400";
        uart2 = "/soc/serial@5000800";
        uart3 = "/soc/serial@5000c00";
        uart4 = "/soc/serial@5001000";
        uart5 = "/soc/serial@5001400";
        i2c0 = "/soc/i2c@5002000";
        i2c1 = "/soc/i2c@5002400";
        i2c2 = "/soc/i2c@5002800";
        i2c3 = "/soc/i2c@5002c00";
        i2c4 = "/soc/i2c@5003000";
        spi0 = "/soc/spi@5010000";
        spi1 = "/soc/spi@5011000";
        can = "/soc/spi@5011000/mcp2515@0";
        tft_35 = "/soc/spi@5011000/st7796@1";
        emac0 = "/soc/ethernet@5020000";
        mdio0 = "/soc/ethernet@5020000/mdio";
        ext_rgmii_phy = "/soc/ethernet@5020000/mdio/ethernet-phy@1";
        emac1 = "/soc/ethernet@5030000";
        mdio1 = "/soc/ethernet@5030000/mdio";
        rmii_phy = "/soc/ethernet@5030000/mdio/ethernet-phy@1";
        usbotg = "/soc/usb@5100000";
        usbphy = "/soc/phy@5100400";
        ehci0 = "/soc/usb@5101000";
        ohci0 = "/soc/usb@5101400";
        ehci1 = "/soc/usb@5200000";
        ohci1 = "/soc/usb@5200400";
        ehci2 = "/soc/usb@5310000";
        ohci2 = "/soc/usb@5310400";
        ehci3 = "/soc/usb@5311000";
        ohci3 = "/soc/usb@5311400";
        hdmi = "/soc/hdmi@6000000";
        hdmi_in = "/soc/hdmi@6000000/ports/port@0";
        hdmi_in_tcon_top = "/soc/hdmi@6000000/ports/port@0/endpoint";
        hdmi_out = "/soc/hdmi@6000000/ports/port@1";
        hdmi_out_con = "/soc/hdmi@6000000/ports/port@1/endpoint";
        hdmi_phy = "/soc/hdmi-phy@6010000";
        hdmi_audio = "/soc/hdmi-audio@1";
        tcon_top = "/soc/tcon-top@6510000";
        tcon_top_mixer0_in = "/soc/tcon-top@6510000/ports/port@0";
        tcon_top_mixer0_in_mixer0 = "/soc/tcon-top@6510000/ports/port@0/endpoint@0";
        tcon_top_mixer0_out = "/soc/tcon-top@6510000/ports/port@1";
        tcon_top_mixer0_out_tcon_tv = "/soc/tcon-top@6510000/ports/port@1/endpoint@2";
        tcon_top_hdmi_in = "/soc/tcon-top@6510000/ports/port@4";
        tcon_top_hdmi_in_tcon_tv = "/soc/tcon-top@6510000/ports/port@4/endpoint@0";
        tcon_top_hdmi_out = "/soc/tcon-top@6510000/ports/port@5";
        tcon_top_hdmi_out_hdmi = "/soc/tcon-top@6510000/ports/port@5/endpoint";
        gpu = "/soc/gpu@0x01800000";
        tcon_tv = "/soc/lcd-controller@6515000";
        tcon_tv_in = "/soc/lcd-controller@6515000/ports/port@0";
        tcon_tv_in_tcon_top_mixer0 = "/soc/lcd-controller@6515000/ports/port@0/endpoint";
        tcon_tv_out = "/soc/lcd-controller@6515000/ports/port@1";
        tcon_tv_out_tcon_top = "/soc/lcd-controller@6515000/ports/port@1/endpoint@1";
        rtc = "/soc/rtc@7000000";
        r_ccu = "/soc/clock@7010000";
        r_pio = "/soc/pinctrl@7022000";
        r_i2c_pins = "/soc/pinctrl@7022000/r-i2c-pins";
        r_rsb_pins = "/soc/pinctrl@7022000/r-rsb-pins";
        ir = "/soc/ir@7040000";
        r_i2c = "/soc/i2c@7081400";
        axp1530 = "/soc/i2c@7081400/pmic@36";
        standby_param = "/soc/i2c@7081400/pmic@36/standby_param";
        reg_dcdc1 = "/soc/i2c@7081400/pmic@36/regulators/dcdc1";
        reg_dcdc2 = "/soc/i2c@7081400/pmic@36/regulators/dcdc2";
        reg_dcdc3 = "/soc/i2c@7081400/pmic@36/regulators/dcdc3";
        reg_aldo1 = "/soc/i2c@7081400/pmic@36/regulators/ldo1";
        reg_dldo1 = "/soc/i2c@7081400/pmic@36/regulators/ldo2";
        r_rsb = "/soc/rsb@7083000";
        ths = "/soc/thermal-sensor@5070400";
        dump_reg = "/soc/dump_reg@20000";
        addr_mgt = "/soc/addr-mgt";
        cpu_warm = "/thermal-zones/cpu-thermal/trips/cpu_warm";
        cpu_hot_pre = "/thermal-zones/cpu-thermal/trips/cpu_hot_pre";
        cpu_hot = "/thermal-zones/cpu-thermal/trips/cpu_hot";
        cpu_very_hot = "/thermal-zones/cpu-thermal/trips/cpu_very_hot";
        cpu_crit = "/thermal-zones/cpu-thermal/trips/cpu_crit";
        cpu_opp_table = "/opp-table-cpu";
        hdmi_con_in = "/connector/port/endpoint";
        mcp2515_clock = "/mcp2515_clock";
        i2c_gpio = "/i2c-gpio";
        tft_tp = "/i2c-gpio/ns2009@48";
        light = "/i2c-gpio/bh1750@5c";
        reg_vcc5v = "/vcc5v";
        reg_usb1_vbus = "/usb1-vbus";
        reg_vcc33_wifi = "/vcc33-wifi";
        reg_vcc_wifi_io = "/vcc-wifi-io";
        wifi_pwrseq = "/wifi-pwrseq";
    };
};

and finaly my testing in

root@mangopi:/sys/kernel/debug/pinctrl/300b000.pinctrl# pwd
/sys/kernel/debug/pinctrl/300b000.pinctrl
root@mangopi:/sys/kernel/debug/pinctrl/300b000.pinctrl# ls -l
total 0
-r--r--r-- 1 root root 0 Jan  1  1970 gpio-ranges
-r--r--r-- 1 root root 0 Jan  1  1970 pinconf-groups
-r--r--r-- 1 root root 0 Jan  1  1970 pinconf-pins
-r--r--r-- 1 root root 0 Jan  1  1970 pingroups
-r--r--r-- 1 root root 0 Jan  1  1970 pinmux-functions
-r--r--r-- 1 root root 0 Jan  1  1970 pinmux-pins
--w------- 1 root root 0 Jan  1  1970 pinmux-select
-r--r--r-- 1 root root 0 Jan  1  1970 pins
root@mangopi:/sys/kernel/debug/pinctrl/300b000.pinctrl# cat pinmux-pins | grep PI
pin 74 (PC10): GPIO 300b000.pinctrl:74
pin 76 (PC12): GPIO 300b000.pinctrl:76
pin 210 (PG18): GPIO 300b000.pinctrl:210
pin 256 (PI0): device 5097000.ahub-i2s0 function i2s0 group PI0
pin 257 (PI1): device 5097000.ahub-i2s0 function i2s0 group PI1
pin 258 (PI2): device 5097000.ahub-i2s0 function i2s0 group PI2
pin 259 (PI3): device 5097000.ahub-i2s0 function i2s0_din1 group PI3
pin 260 (PI4): device 5097000.ahub-i2s0 function i2s0_dout1 group PI4
pin 261 (PI5): UNCLAIMED
pin 262 (PI6): UNCLAIMED
pin 263 (PI7): device 5002400.i2c function i2c1 group PI7
pin 264 (PI8): device 5002400.i2c function i2c1 group PI8
pin 265 (PI9): device 5002800.i2c function i2c2 group PI9
pin 266 (PI10): device 5002800.i2c function i2c2 group PI10
pin 267 (PI11): UNCLAIMED
pin 268 (PI12): UNCLAIMED
pin 269 (PI13): UNCLAIMED
pin 270 (PI14): UNCLAIMED
pin 271 (PI15): UNCLAIMED
pin 272 (PI16): UNCLAIMED
VGCH commented 1 year ago

Great! I'll try to start the sound card.

mamin27 commented 1 year ago

Probably you have to investigate deeper. I was just analyzing and playing with kernel possibility. Let me know if any progress or you could add update of this project.

VGCH commented 1 year ago

Okay, I'll talk about the results. Thank you very much.

VGCH commented 1 year ago

So far I have not been able to get the i2s device running on this board, for some reason the pins do not respond at all to the i2s0 port being accessed. For example, on Raspberry pi, when accessing the i2s port on the i2s pin LRCLK (35), a 45 kHz signal is observed, nothing happens at all on this board. Is it necessary to create an additional dtbo file to initialize the i2s0 port? I've run out of ideas.

mamin27 commented 1 year ago

Thanks for feed back. I will keep it open. Probably someone else will be inspired ... and finalize it.

igrek-xavier commented 1 year ago

Hey guys, I am also interested in having the i2s to work with mango-pi quad using this device tree. First question I have several dtb files in /boot/dtb/allwinner/ (and the newly compiled dts from this git source dts)

orangepi@orangepizero2:/boot/dtb/allwinner$ ls -altr
total 504
-rw-r--r-- 1 root root 37125 Oct  5  2022 sun50i-h6-orangepi-one-plus.dtb
-rw-r--r-- 1 root root 37599 Oct  5  2022 sun50i-h6-orangepi-lite2.dtb
-rw-r--r-- 1 root root 37593 Oct  5  2022 sun50i-h6-orangepi-3-lts.dtb
-rw-r--r-- 1 root root 37998 Oct  5  2022 sun50i-h6-orangepi-3.dtb
-rw-r--r-- 1 root root 38051 Oct  5  2022 sun50i-h616-orangepi-zero2-lts.dtb
-rw-r--r-- 1 root root 37578 Oct  5  2022 sun50i-h616-orangepi-zero2.dtb
-rw-r--r-- 1 root root 38047 Oct  5  2022 sun50i-h616-orangepi-zero2-b.dtb
-rw-r--r-- 1 root root 31329 Oct  5  2022 sun50i-h5-orangepi-zero-plus.dtb
-rw-r--r-- 1 root root 31254 Oct  5  2022 sun50i-h5-orangepi-zero-plus2.dtb
-rw-r--r-- 1 root root 32061 Oct  5  2022 sun50i-h5-orangepi-prime.dtb
-rw-r--r-- 1 root root 32160 Oct  5  2022 sun50i-h5-orangepi-pc2.dtb
-rw-r--r-- 1 root root 43112 Oct  5  2022 sun50i-a64-orangepi-win.dtb
drwxr-xr-x 3 root root  4096 Oct  5  2022 ..
drwxr-xr-x 2 root root  4096 Oct  5  2022 overlay
-rw-r--r-- 1 root root 39069 Apr 19 09:07 sun50i-h616-biqu.dtb

How do I know which dtb is currently used and how to set that uboot is using "sun50i-h616-biqu.dtb" to make some test with i2s exposed on 20x2 rpi connector ?

igrek-xavier commented 1 year ago

Hi @mamin27 @VGCH I have used the attached below dts file to rebuild "sun50i-h616-orangepi-zero2.dtb" file and now I can see the i2s0 in the pin-mux output :

root@orangepizero2:~# cat /sys/kernel/debug/pinctrl/300b000.pinctrl/pinmux-pins | grep PI
pin 76 (PC12): GPIO 300b000.pinctrl:76
pin 77 (PC13): GPIO 300b000.pinctrl:77
pin 80 (PC16): GPIO 300b000.pinctrl:80
pin 166 (PF6): GPIO 300b000.pinctrl:166
pin 210 (PG18): GPIO 300b000.pinctrl:210
pin 256 (PI0): device 5097000.ahub-i2s0 function i2s0 group PI0
pin 257 (PI1): device 5097000.ahub-i2s0 function i2s0 group PI1
pin 258 (PI2): device 5097000.ahub-i2s0 function i2s0 group PI2
pin 259 (PI3): device 5097000.ahub-i2s0 function i2s0_din1 group PI3
pin 260 (PI4): device 5097000.ahub-i2s0 function i2s0_dout1 group PI4
pin 261 (PI5): UNCLAIMED
pin 262 (PI6): UNCLAIMED
pin 263 (PI7): UNCLAIMED
pin 264 (PI8): UNCLAIMED
pin 265 (PI9): UNCLAIMED
pin 266 (PI10): UNCLAIMED
pin 267 (PI11): UNCLAIMED
pin 268 (PI12): UNCLAIMED
pin 269 (PI13): UNCLAIMED
pin 270 (PI14): UNCLAIMED
pin 271 (PI15): UNCLAIMED
pin 272 (PI16): UNCLAIMED

I will try to plug a i2s device (namely sph0645 i2s mems mic chip) to see if there any clk or data flowing.

Below is the DTS used to enable i2s0

sun50i-h616-orangepi-zero2.dts.txt

The below dmesg logs outputs some error on the "sndhub_soc" and "sunxi-hdmi audio"

sun50i-h616-orangepi-zero2.dts.dmesg.txt

These errors probably come from the DTS and needs some DTS corrections.

mamin27 commented 1 year ago

Just give me time for testing. Good job.

lamthientieu commented 1 year ago

so i2s works with audio devices yet. I look forward to it.

igrek-xavier commented 1 year ago

@lamthientieu currently we are trying to get the i2s signal (using i2s enabled DTS, sun4i-i2s.ko or snd_i2smic_rpi.ko kernel modules and 5.16.17-sun50iw9 image) to work for MIC devices (such as WM8960, PCM1840 or SPH0645 mic chip). Our work may interest also DAC people who will use the I2S to add a speaker to a mango-pi

lamthientieu commented 1 year ago

@igrek-xavier If successful, you will create a large community of mangopi users. because currently that's the limitation between raspi and many other devices that can't do is i2s. (such as WM8960, PCM1840 or SPH0645 mic chip and audio i2s). let me know if you succeed i look forward to it. email: lamthientieu@gmail.com . Thank you

igrek-xavier commented 1 year ago

@mamin27 @VGCH when I try the DTS upper here in this thread https://github.com/mamin27/H616-mangopi/issues/1#issuecomment-1487632624 the mangopi-quad does not boot, do you have a working DTS source I can build and test to enable i2s0 ? Can you send again or push it on this repo ? Thanks.

yejianfei commented 1 year ago

I use PCM1865 to test this DTS, the sound card can be recognized normally, but when running the arecord command, the kernel reports an error, and it seems that there is an error when modifying CLK, no matter whether it is SOC or CODEC is master, the result is the same.

[ 843.888689] CPU: 2 PID: 1832 Comm: arecord Tainted: G WC 5.19.4-sunxi64 #22.08.2 [ 843.888712] Hardware name: MangoPi Mcore (DT) [ 843.888724] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 843.888745] pc : ccu_helper_wait_for_lock.part.0+0x74/0x98 [ 843.888765] lr : ccu_helper_wait_for_lock.part.0+0x4c/0x98 [ 843.888783] sp : ffff80000b083680 [ 843.888793] x29: ffff80000b083680 x28: ffff00000398aa00 x27: 0000000000000001 [ 843.888826] x26: ffff800008b3bcd8 x25: ffff8000094edd20 x24: ffff8000094edd38 [ 843.888857] x23: ffff8000094edd60 x22: ffff8000094edd80 x21: 000000c47c5f3f57 [ 843.888890] x20: 0000000010000000 x19: 00000000a93fff01 x18: 0000000000000001 [ 843.888921] x17: 0000000000000000 x16: 0000000000000001 x15: 000030e3efc9977c [ 843.888950] x14: 0000000000000223 x13: 0000000000000001 x12: 0000000000000000 [ 843.888980] x11: 0000000000000001 x10: 0000000000000990 x9 : ffff80000b083510 [ 843.889011] x8 : ffff00000398b3f0 x7 : ffff00003fd9b080 x6 : 00000004bd2165c1 [ 843.889041] x5 : 00ffffffffffffff x4 : 00176df81d63357d x3 : 0000000000000018 [ 843.889072] x2 : 0000000000012182 x1 : 0000000029aae65c x0 : 000000c47c60dc63 [ 843.889104] Call trace: [ 843.889112] ccu_helper_wait_for_lock.part.0+0x74/0x98 [ 843.889133] ccu_helper_wait_for_lock+0x14/0x28 [ 843.889152] ccu_nm_set_rate+0x200/0x4b8 [ 843.889175] clk_change_rate+0x148/0x2d0 [ 843.889197] clk_core_set_rate_nolock+0x1d4/0x248 [ 843.889217] clk_set_rate+0x38/0xa8 [ 843.889236] sunxi_ahub_daudio_set_sysclk+0x28/0x80 [ 843.889257] snd_soc_dai_set_sysclk+0x38/0xa0 [ 843.889281] asoc_simple_shutdown+0xbc/0x190 [snd_soc_simple_card_utils] [ 843.889309] snd_soc_link_shutdown+0x4c/0x60 [ 843.889329] soc_pcm_clean+0x7c/0x158 [ 843.889345] soc_pcm_close+0x34/0x58 [ 843.889360] snd_pcm_release_substream.part.0+0x40/0xa8 [ 843.889386] snd_pcm_open_substream+0x784/0x868 [ 843.889402] snd_pcm_open+0xf8/0x230 [ 843.889418] snd_pcm_capture_open+0x4c/0x78 [ 843.889435] snd_open+0xac/0x1a8 [ 843.889455] chrdev_open+0xc4/0x240 [ 843.889476] do_dentry_open+0x12c/0x398 [ 843.889498] vfs_open+0x2c/0x38 [ 843.889518] path_openat+0x4a0/0x1038 [ 843.889536] do_filp_open+0x84/0x110 [ 843.889554] do_sys_openat2+0x214/0x2e0 [ 843.889574] do_sys_open+0x58/0xa8 [ 843.889594] __arm64_sys_openat+0x24/0x30 [ 843.889615] invoke_syscall+0x44/0x108 [ 843.889638] el0_svc_common.constprop.0+0x44/0xf0 [ 843.889659] do_el0_svc+0x2c/0xb8 [ 843.889678] el0_svc+0x2c/0x88 [ 843.889702] el0t_64_sync_handler+0xb8/0xc0 [ 843.889724] el0t_64_sync+0x18c/0x190 [ 843.889743] ---[ end trace 0000000000000000 ]---

This is the OS I use:

https://github.com/open-cores/mangguo-h616-armbian/tree/v22.08

                    ahub_i2s0: ahub-i2s0@0x05097000 {
                            #sound-dai-cells = <0>;
                            compatible = "allwinner,sunxi-ahub-daudio";
                            reg = <0x05090000 0x7c>;
                            clocks = <&ccu 94>,
                                     <&ccu 91>,
                                     <&ccu 92>,
                                     <&ccu 95>;
                            clock-names = "apb", "audio-codec-1x", "audio-codec-4x", "audio-hub";
                            pinctrl-names = "default","default","default";
                            pinctrl-0 = <&i2s0_pins>;
                            pinctrl-1 = <&i2s0_in_pins>;
                            pinctrl-2 = <&i2s0_out_pins>;
                            tdm_num = <0x00>;
                            pinconfig = <0x01>;
                            frametype = <0x00>;
                            pcm_lrck_period = <0x20>;
                            slot_width_select = <0x20>;
                            daudio_master = <0x04>;
                            audio_format = <0x01>;
                            signal_inversion = <0x02>;
                            tdm_config = <0x01>;
                            mclk_div = <0x04>;
                            status = "okay";
                    };

                    pcm1865-sound {
                            status = "okay";
                            compatible = "simple-audio-card";
                            simple-audio-card,name = "IT,PCM1865";
                            simple-audio-card,format = "i2s";
                            simple-audio-card,frame-master = <&cpu_dai>;
                            simple-audio-card,bitclock-master = <&cpu_dai>;
                             simple-audio-card,mclk-fs = <256>;
                            simple-audio-card,widgets =
                                    "Line In", "Line In 1",
                                    "Line In", "Line In 2",
                                    "Line In", "Line In 3",
                                    "Line In", "Line In 4";
                            simple-audio-card,routing =
                                    "Line In 1", "VINL1",
                                    "Line In 1", "VINR1",
                                    "Line In 2", "VINL2",
                                    "Line In 2", "VINR2",
                                    "Line In 3", "VINL3",
                                    "Line In 3", "VINR3",
                                    "Line In 4", "VINL4",
                                    "Line In 4", "VINR4";

                            cpu_dai: simple-audio-card,cpu {
                                    sound-dai = <&ahub_i2s0>;
                            };

                            codec_dai: simple-audio-card,codec {
                                    sound-dai = <&pcm1865>;
                                    clocks = <&osc24M>;
                            };
                    };
mamin27 commented 1 year ago

Thanks for you great job! Please could you create merge request to my project.

Regards

Marian

igrek-xavier commented 1 year ago

@yejianfei hello thanks a lot for your great update, it seems that there is a clk issue somewhere. Can you print and send here the dmesg and pinctlmux outputs ? We need to check the driver connexion between the physical clock and the ALSA driver used by arecord. Cheers.

yejianfei commented 1 year ago

@igrek-xavier

Ok, I uploaded the log files you need.

dmesg.log pinmux-pins.log sun50i-h616-mangopi-mcore-overlay.txt

arkadijs commented 7 months ago

Hi, I haven't read the whole thread in details and for that I apologies. But, I've made I2S output work on MQ-Pro, so maybe, these bits could be of any help as sunxi SoC parts are shared. https://github.com/arkadijs/linux/commit/58919d94dc9d5f6833ee051601d17943832b5fc0

It only likes certain output sampling frequencies though, like 48kHz.

igrek-xavier commented 7 months ago

@arkadijs this is a great news ! thanks a lot for sharing it. Could you share the hardware I2S system you used wired on the MQ-Pro ? We surely would like to try on our side your great achievement and get some sound over I2S (48kHz is great). I will try to give a try soon and report the results. Best.

arkadijs commented 7 months ago

I use simple and cheap DACs from AliExpress: TI PCM5102 (any PCM510x) and ES7148/ES7134. Standard Raspberry Pi wiring works on MQ-Pro:

System Clock - not connected / grounded Bit Clock - Pin 12 / PCM CLK Left Right Clock - Pin 35 / PCM FS Data In - Pin 40 / PCM DOUT 5v power from SBC pins 4, 6

On MQ-Pro I2S2 device is connected to the headers.

https://raspberrypi.stackexchange.com/questions/76188/how-to-make-pcm5102-dac-work-on-raspberry-pi-zerow https://www.aliexpress.com/item/1005002898278583.html https://pinout.xyz/ https://github.com/arkadijs/riscv-doom

mamin27 commented 7 months ago

Thanks, I will look at it.

mamin27 commented 7 months ago

I have ordered I2S PCM5102A board for testing. :-)

yejianfei commented 7 months ago

@mamin27 I successfully ran the I2S device on the T113S. They also support the TDM protocol. I checked Linux 6.5.13 and found that the I2S drivers of the H616 and T113S both use the same driver file sun4i-i2s.c. I haven’t had much trouble recently. Take more time to test whether using Buildrootto create the H616 image can successfully run I2S0.Hope you can succeed.

igrek-xavier commented 7 months ago

@yejianfei this is great news ! Have you recorded some sound ? Which Linux 6.5.13 image did you use for the T113S ? Which DTS did you use ? Did you use a D1 board with wiring for the I2S ? I am targeting the H616 for I2S and will see with @mamin27 if you can get an image and DTS to test on a H616 mangopi board.