Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR MIT |
| 2 | /* |
| 3 | * Apple M1 Mac mini, MacBook Air/Pro, iMac 24" (M1, 2020/2021) |
| 4 | * |
| 5 | * This file contains parts common to all Apple M1 devices using the t8103. |
| 6 | * |
| 7 | * target-type: J274, J293, J313, J456, J457 |
| 8 | * |
| 9 | * Copyright The Asahi Linux Contributors |
| 10 | */ |
| 11 | |
| 12 | #include <dt-bindings/spmi/spmi.h> |
| 13 | |
| 14 | / { |
| 15 | aliases { |
| 16 | serial0 = &serial0; |
| 17 | serial2 = &serial2; |
| 18 | wifi0 = &wifi0; |
| 19 | }; |
| 20 | |
| 21 | chosen { |
| 22 | #address-cells = <2>; |
| 23 | #size-cells = <2>; |
| 24 | ranges; |
| 25 | |
| 26 | stdout-path = "serial0"; |
| 27 | |
| 28 | framebuffer0: framebuffer@0 { |
| 29 | compatible = "apple,simple-framebuffer", "simple-framebuffer"; |
| 30 | reg = <0 0 0 0>; /* To be filled by loader */ |
| 31 | /* Format properties will be added by loader */ |
| 32 | status = "disabled"; |
| 33 | }; |
| 34 | }; |
| 35 | |
| 36 | memory@800000000 { |
| 37 | device_type = "memory"; |
| 38 | reg = <0x8 0 0x2 0>; /* To be filled by loader */ |
| 39 | }; |
| 40 | }; |
| 41 | |
| 42 | &serial0 { |
| 43 | status = "okay"; |
| 44 | }; |
| 45 | |
| 46 | &serial2 { |
| 47 | status = "okay"; |
| 48 | }; |
| 49 | |
| 50 | &i2c0 { |
| 51 | hpm0: usb-pd@38 { |
| 52 | compatible = "apple,cd321x"; |
| 53 | reg = <0x38>; |
| 54 | interrupt-parent = <&pinctrl_ap>; |
| 55 | interrupts = <106 IRQ_TYPE_LEVEL_LOW>; |
| 56 | interrupt-names = "irq"; |
| 57 | |
| 58 | typec0: connector { |
| 59 | compatible = "usb-c-connector"; |
| 60 | power-role = "dual"; |
| 61 | data-role = "dual"; |
| 62 | |
| 63 | ports { |
| 64 | #address-cells = <1>; |
| 65 | #size-cells = <0>; |
| 66 | port@0 { |
| 67 | reg = <0>; |
| 68 | typec0_con_hs: endpoint { |
| 69 | remote-endpoint = <&typec0_usb_hs>; |
| 70 | }; |
| 71 | }; |
| 72 | }; |
| 73 | }; |
| 74 | }; |
| 75 | |
| 76 | hpm1: usb-pd@3f { |
| 77 | compatible = "apple,cd321x"; |
| 78 | reg = <0x3f>; |
| 79 | interrupt-parent = <&pinctrl_ap>; |
| 80 | interrupts = <106 IRQ_TYPE_LEVEL_LOW>; |
| 81 | interrupt-names = "irq"; |
| 82 | |
| 83 | typec1: connector { |
| 84 | compatible = "usb-c-connector"; |
| 85 | power-role = "dual"; |
| 86 | data-role = "dual"; |
| 87 | |
| 88 | ports { |
| 89 | #address-cells = <1>; |
| 90 | #size-cells = <0>; |
| 91 | port@0 { |
| 92 | reg = <0>; |
| 93 | typec1_con_hs: endpoint { |
| 94 | remote-endpoint = <&typec1_usb_hs>; |
| 95 | }; |
| 96 | }; |
| 97 | }; |
| 98 | }; |
| 99 | }; |
| 100 | }; |
| 101 | |
| 102 | /* USB controllers */ |
| 103 | &dwc3_0 { |
| 104 | port { |
| 105 | typec0_usb_hs: endpoint { |
| 106 | remote-endpoint = <&typec0_con_hs>; |
| 107 | }; |
| 108 | }; |
| 109 | }; |
| 110 | |
| 111 | &dwc3_1 { |
| 112 | port { |
| 113 | typec1_usb_hs: endpoint { |
| 114 | remote-endpoint = <&typec1_con_hs>; |
| 115 | }; |
| 116 | }; |
| 117 | }; |
| 118 | |
| 119 | /* |
| 120 | * Force the bus number assignments so that we can declare some of the |
| 121 | * on-board devices and properties that are populated by the bootloader |
| 122 | * (such as MAC addresses). |
| 123 | */ |
| 124 | &port00 { |
| 125 | bus-range = <1 1>; |
| 126 | pwren-gpios = <&smc 13 0>; |
| 127 | wifi0: network@0,0 { |
| 128 | compatible = "pci14e4,4425"; |
| 129 | reg = <0x10000 0x0 0x0 0x0 0x0>; |
| 130 | /* To be filled by the loader */ |
| 131 | local-mac-address = [00 00 00 00 00 00]; |
| 132 | apple,antenna-sku = "XX"; |
| 133 | }; |
| 134 | }; |
| 135 | |
| 136 | &spmi { |
| 137 | status = "okay"; |
| 138 | |
| 139 | pmu@f { |
| 140 | compatible = "apple,sera-pmu"; |
| 141 | reg = <0xf SPMI_USID>; |
| 142 | }; |
| 143 | }; |