工具与软件:
gpmc0引脚:-
gpmc0_pins_default: gpmc0-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x00b8, PIN_OUTPUT, 1) /* (U22) VOUT0_DATA0.GPMC0_A0 */
AM62X_IOPAD(0x00bc, PIN_OUTPUT, 1) /* (V24) VOUT0_DATA1.GPMC0_A1 */
AM62X_IOPAD(0x00e0, PIN_OUTPUT, 1) /* (V20) VOUT0_DATA10.GPMC0_A10 */
AM62X_IOPAD(0x00e4, PIN_OUTPUT, 1) /* (AA23) VOUT0_DATA11.GPMC0_A11 */
AM62X_IOPAD(0x00c0, PIN_OUTPUT, 1) /* (W25) VOUT0_DATA2.GPMC0_A2 */
AM62X_IOPAD(0x00c4, PIN_OUTPUT, 1) /* (W24) VOUT0_DATA3.GPMC0_A3 */
AM62X_IOPAD(0x00c8, PIN_OUTPUT, 1) /* (Y25) VOUT0_DATA4.GPMC0_A4 */
AM62X_IOPAD(0x00cc, PIN_OUTPUT, 1) /* (Y24) VOUT0_DATA5.GPMC0_A5 */
AM62X_IOPAD(0x00d0, PIN_OUTPUT, 1) /* (Y23) VOUT0_DATA6.GPMC0_A6 */
AM62X_IOPAD(0x00d4, PIN_OUTPUT, 1) /* (AA25) VOUT0_DATA7.GPMC0_A7 */
AM62X_IOPAD(0x00d8, PIN_OUTPUT, 1) /* (V21) VOUT0_DATA8.GPMC0_A8 */
AM62X_IOPAD(0x00dc, PIN_OUTPUT, 1) /* (W21) VOUT0_DATA9.GPMC0_A9 */
AM62X_IOPAD(0x003c, PIN_INPUT, 0) /* (M25) GPMC0_AD0 */
AM62X_IOPAD(0x0040, PIN_INPUT, 0) /* (N23) GPMC0_AD1 */
AM62X_IOPAD(0x0064, PIN_INPUT, 0) /* (T25) GPMC0_AD10 */
AM62X_IOPAD(0x0068, PIN_INPUT, 0) /* (R21) GPMC0_AD11 */
AM62X_IOPAD(0x006c, PIN_INPUT, 0) /* (T22) GPMC0_AD12 */
AM62X_IOPAD(0x0070, PIN_INPUT, 0) /* (T24) GPMC0_AD13 */
AM62X_IOPAD(0x0074, PIN_INPUT, 0) /* (U25) GPMC0_AD14 */
AM62X_IOPAD(0x0078, PIN_INPUT, 0) /* (U24) GPMC0_AD15 */
AM62X_IOPAD(0x0044, PIN_INPUT, 0) /* (N24) GPMC0_AD2 */
AM62X_IOPAD(0x0048, PIN_INPUT, 0) /* (N25) GPMC0_AD3 */
AM62X_IOPAD(0x004c, PIN_INPUT, 0) /* (P24) GPMC0_AD4 */
AM62X_IOPAD(0x0050, PIN_INPUT, 0) /* (P22) GPMC0_AD5 */
AM62X_IOPAD(0x0054, PIN_INPUT, 0) /* (P21) GPMC0_AD6 */
AM62X_IOPAD(0x0058, PIN_INPUT, 0) /* (R23) GPMC0_AD7 */
AM62X_IOPAD(0x005c, PIN_INPUT, 0) /* (R24) GPMC0_AD8 */
AM62X_IOPAD(0x0060, PIN_INPUT, 0) /* (R25) GPMC0_AD9 */
AM62X_IOPAD(0x0098, PIN_INPUT, 0) /* (U23) GPMC0_WAIT0 */
AM62X_IOPAD(0x00b0, PIN_OUTPUT, 0) /* (K22) GPMC0_CSn2 */
AM62X_IOPAD(0x0088, PIN_OUTPUT, 0) /* (L24) GPMC0_OEn_REn */
AM62X_IOPAD(0x008c, PIN_OUTPUT, 0) /* (L25) GPMC0_WEn */
>;
};
GPMC0节点:-
&gpmc0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&gpmc0_pins_default>;
ranges = <2 0 0x0 0x51000000 0x00800000>; /* 8MB */
#address-cells = <2>;
#size-cells = <1>;
sram@08000000 {
compatible = "cypress,cy7c02av";
reg = <2 0 64>;
#address-cells = <1>;
#size-cells = <1>;
gpmc,cs = <2>;
gpmc,device-width = <2>; /* 16-bit DPRAM */
gpmc,mux-add-data = <0>; /* No address/data mux */
gpmc,wait-pin = <0>; /* No wait pin required */
/* Corrected Timing Parameters for 25 ns cycle */
gpmc,cs-on-ns = <10>;
gpmc,cs-rd-off-ns = <30>;
gpmc,cs-wr-off-ns = <30>;
gpmc,adv-on-ns = <0>;
gpmc,adv-rd-off-ns = <30>;
gpmc,adv-wr-off-ns = <30>;
gpmc,we-on-ns = <10>;
gpmc,we-off-ns = <30>;
gpmc,oe-on-ns = <10>;
gpmc,oe-off-ns = <30>;
gpmc,rd-cycle-ns = <25>;
gpmc,wr-cycle-ns = <25>;
gpmc,access-ns = <20>;
gpmc,wr-access-ns = <20>;
gpmc,cycle2cycle-delay-ns = <10>;
gpmc,wr-data-mux-bus-ns = <10>;
gpmc,bus-turnaround-ns = <10>;
/* Removed unsupported burst settings */
};
};
问题:内存未映射/proc/iomem
root@phyboard-lyra-am62xx-3:~# cat /proc/iomem 000f4000-000f42ab : pinctrl-single 00600000-006000ff : 600000.gpio gpio@600000 00601000-006010ff : 601000.gpio gpio@601000 00b00000-00b003ff : b00000.temperature-sensor temperature-sensor@b00000 00b01000-00b013ff : b00000.temperature-sensor temperature-sensor@b00000 01800000-0180ffff : GICD 01880000-0193ffff : GICR 02400000-024003ff : 2400000.timer timer@2400000 02410000-024103ff : 2410000.timer timer@2410000 02420000-024203ff : 2420000.timer timer@2420000 02430000-024303ff : 2430000.timer timer@2430000 02440000-024403ff : 2440000.timer timer@2440000 02450000-024503ff : 2450000.timer timer@2450000 02460000-024603ff : 2460000.timer timer@2460000 02470000-024703ff : 2470000.timer timer@2470000 02800000-0280001f : serial 02810000-0281001f : serial 04084000-04084087 : pinctrl-single 05000000-0502ffff : 5000000.m4fss 05040000-0504ffff : 5000000.m4fss 08000000-081fffff : 8000000.ethernet cpsw_nuss 0e000000-0e0000ff : e000000.watchdog watchdog@e000000 0e010000-0e0100ff : e010000.watchdog watchdog@e010000 0f900000-0f9007ff : f900000.dwc3-usb dwc3-usb@f900000 0f908000-0f9083ff : f900000.dwc3-usb dwc3-usb@f900000 0f910000-0f9107ff : f910000.dwc3-usb dwc3-usb@f910000 0f918000-0f9183ff : f910000.dwc3-usb dwc3-usb@f910000 0fa00000-0fa00fff : fa00000.mmc mmc@fa00000 0fa08000-0fa083ff : fa00000.mmc mmc@fa00000 0fa10000-0fa10fff : fa10000.mmc mmc@fa10000 0fa18000-0fa183ff : fa10000.mmc mmc@fa10000 0fc40000-0fc400ff : fc40000.spi spi@fc40000 20000000-200000ff : 20000000.i2c i2c@20000000 20010000-200100ff : 20010000.i2c i2c@20010000 29000000-290001ff : 29000000.mailbox mailbox@29000000 2a000000-2a000fff : 2a000000.spinlock spinlock@2a000000 2b1f0000-2b1f00ff : 2b1f0000.rtc rtc@2b1f0000 30060000-30061fff : 30060000.interrupt-controller interrupt-controller@20000 30062000-300620ff : 30074000.pru control 30062400-300624ff : 30074000.pru debug 30064000-300640ff : 30078000.pru control 30064400-300644ff : 30078000.pru debug 30074000-30076fff : 30074000.pru iram 30078000-3007afff : 30078000.pru iram 30300000-30300fff : 30300000.mcrc mcrc@30300000 31100000-31107fff : usb@31100000 31100000-31107fff : xhci-hcd.4.auto usb@31100000 3110c100-3114ffff : 31100000.usb usb@31100000 3b000000-3b0003ff : 3b000000.memory-controller cfg 40900000-409011ff : 40900000.crypto crypto@40900000 44043000-44043fdf : 44043000.system-controller debug_messages 48000000-480fffff : 48000000.interrupt-controller interrupt-controller@48000000 485c0000-485c00ff : 485c0000.dma-controller gcfg 485c0100-485c01ff : 485c0100.dma-controller gcfg 4a400000-4a47ffff : 4d000000.mailbox scfg 4a600000-4a67ffff : 4d000000.mailbox rt 4a800000-4a81ffff : 485c0000.dma-controller rchanrt 4a820000-4a83ffff : 485c0100.dma-controller rchanrt 4aa00000-4aa3ffff : 485c0000.dma-controller tchanrt 4aa40000-4aa5ffff : 485c0100.dma-controller tchanrt 4b800000-4bbfffff : 485c0000.dma-controller ringrt 4bc00000-4bcfffff : 485c0100.dma-controller ringrt 4c000000-4c01ffff : 485c0100.dma-controller bchanrt 4d000000-4d07ffff : 4d000000.mailbox target_data 70000000-7000ffff : 70000000.sram sram@70000000 80000000-9c7fffff : System RAM 82010000-8311ffff : Kernel code 83120000-8334ffff : reserved 83350000-8351ffff : Kernel data 87fff000-87ffffff : reserved 8ffed000-8fffbfff : reserved 9c700000-9c7fffff : reserved 9c800000-9e6fffff : reserved 9e700000-9e77ffff : System RAM 9e780000-9fffffff : reserved a0000000-bfffffff : System RAM b6c00000-b7bfffff : reserved b7c14000-b7d94fff : reserved b7d95000-b7dbafff : reserved b7dbd000-b7dbffff : reserved b7dc0000-b7dd0fff : reserved b7dd1000-bfffffff : reserved 500000000-5ffffffff : fc40000.spi spi@fc40000