1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/spi/samsung,spi.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: Samsung S3C/S5P/Exynos SoC SPI controller 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Krzysztof Kozlowski <krzk@kernel.org> 11c9ccf3a3SEmmanuel Vadot 12c9ccf3a3SEmmanuel Vadotdescription: 13c9ccf3a3SEmmanuel Vadot All the SPI controller nodes should be represented in the aliases node using 14c9ccf3a3SEmmanuel Vadot the following format 'spi{n}' where n is a unique number for the alias. 15c9ccf3a3SEmmanuel Vadot 16c9ccf3a3SEmmanuel Vadotproperties: 17c9ccf3a3SEmmanuel Vadot compatible: 18c9ccf3a3SEmmanuel Vadot oneOf: 19c9ccf3a3SEmmanuel Vadot - enum: 20c9ccf3a3SEmmanuel Vadot - samsung,s3c2443-spi # for S3C2443, S3C2416 and S3C2450 21c9ccf3a3SEmmanuel Vadot - samsung,s3c6410-spi 22c9ccf3a3SEmmanuel Vadot - samsung,s5pv210-spi # for S5PV210 and S5PC110 23*b97ee269SEmmanuel Vadot - samsung,exynos4210-spi 24c9ccf3a3SEmmanuel Vadot - samsung,exynos5433-spi 25*b97ee269SEmmanuel Vadot - samsung,exynosautov9-spi 26c9ccf3a3SEmmanuel Vadot - tesla,fsd-spi 27c9ccf3a3SEmmanuel Vadot - const: samsung,exynos7-spi 28c9ccf3a3SEmmanuel Vadot deprecated: true 29c9ccf3a3SEmmanuel Vadot 30c9ccf3a3SEmmanuel Vadot clocks: 31c9ccf3a3SEmmanuel Vadot minItems: 2 32c9ccf3a3SEmmanuel Vadot maxItems: 3 33c9ccf3a3SEmmanuel Vadot 34c9ccf3a3SEmmanuel Vadot clock-names: 35c9ccf3a3SEmmanuel Vadot minItems: 2 36c9ccf3a3SEmmanuel Vadot maxItems: 3 37c9ccf3a3SEmmanuel Vadot 38c9ccf3a3SEmmanuel Vadot dmas: 39c9ccf3a3SEmmanuel Vadot minItems: 2 40c9ccf3a3SEmmanuel Vadot maxItems: 2 41c9ccf3a3SEmmanuel Vadot 42c9ccf3a3SEmmanuel Vadot dma-names: 43c9ccf3a3SEmmanuel Vadot items: 44c9ccf3a3SEmmanuel Vadot - const: tx 45c9ccf3a3SEmmanuel Vadot - const: rx 46c9ccf3a3SEmmanuel Vadot 47c9ccf3a3SEmmanuel Vadot interrupts: 48c9ccf3a3SEmmanuel Vadot maxItems: 1 49c9ccf3a3SEmmanuel Vadot 50c9ccf3a3SEmmanuel Vadot no-cs-readback: 51c9ccf3a3SEmmanuel Vadot description: 52c9ccf3a3SEmmanuel Vadot The CS line is disconnected, therefore the device should not operate 53c9ccf3a3SEmmanuel Vadot based on CS signalling. 54c9ccf3a3SEmmanuel Vadot type: boolean 55c9ccf3a3SEmmanuel Vadot 56c9ccf3a3SEmmanuel Vadot num-cs: 57c9ccf3a3SEmmanuel Vadot minimum: 1 58c9ccf3a3SEmmanuel Vadot maximum: 4 59c9ccf3a3SEmmanuel Vadot default: 1 60c9ccf3a3SEmmanuel Vadot 61c9ccf3a3SEmmanuel Vadot samsung,spi-src-clk: 62c9ccf3a3SEmmanuel Vadot description: 63c9ccf3a3SEmmanuel Vadot If the spi controller includes a internal clock mux to select the clock 64c9ccf3a3SEmmanuel Vadot source for the spi bus clock, this property can be used to indicate the 65c9ccf3a3SEmmanuel Vadot clock to be used for driving the spi bus clock. If not specified, the 66c9ccf3a3SEmmanuel Vadot clock number 0 is used as default. 67c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 68c9ccf3a3SEmmanuel Vadot default: 0 69c9ccf3a3SEmmanuel Vadot 70c9ccf3a3SEmmanuel Vadot reg: 71c9ccf3a3SEmmanuel Vadot maxItems: 1 72c9ccf3a3SEmmanuel Vadot 73c9ccf3a3SEmmanuel Vadotrequired: 74c9ccf3a3SEmmanuel Vadot - compatible 75c9ccf3a3SEmmanuel Vadot - clocks 76c9ccf3a3SEmmanuel Vadot - clock-names 77c9ccf3a3SEmmanuel Vadot - dmas 78c9ccf3a3SEmmanuel Vadot - dma-names 79c9ccf3a3SEmmanuel Vadot - interrupts 80c9ccf3a3SEmmanuel Vadot - reg 81c9ccf3a3SEmmanuel Vadot 82c9ccf3a3SEmmanuel VadotallOf: 83c9ccf3a3SEmmanuel Vadot - $ref: spi-controller.yaml# 84c9ccf3a3SEmmanuel Vadot - if: 85c9ccf3a3SEmmanuel Vadot properties: 86c9ccf3a3SEmmanuel Vadot compatible: 87c9ccf3a3SEmmanuel Vadot contains: 88*b97ee269SEmmanuel Vadot enum: 89*b97ee269SEmmanuel Vadot - samsung,exynos5433-spi 90*b97ee269SEmmanuel Vadot - samsung,exynosautov9-spi 91c9ccf3a3SEmmanuel Vadot then: 92c9ccf3a3SEmmanuel Vadot properties: 93c9ccf3a3SEmmanuel Vadot clocks: 94c9ccf3a3SEmmanuel Vadot minItems: 3 95c9ccf3a3SEmmanuel Vadot maxItems: 3 96c9ccf3a3SEmmanuel Vadot clock-names: 97c9ccf3a3SEmmanuel Vadot items: 98c9ccf3a3SEmmanuel Vadot - const: spi 99c9ccf3a3SEmmanuel Vadot - enum: 100c9ccf3a3SEmmanuel Vadot - spi_busclk0 101c9ccf3a3SEmmanuel Vadot - spi_busclk1 102c9ccf3a3SEmmanuel Vadot - spi_busclk2 103c9ccf3a3SEmmanuel Vadot - spi_busclk3 104c9ccf3a3SEmmanuel Vadot - const: spi_ioclk 105c9ccf3a3SEmmanuel Vadot else: 106c9ccf3a3SEmmanuel Vadot properties: 107c9ccf3a3SEmmanuel Vadot clocks: 108c9ccf3a3SEmmanuel Vadot minItems: 2 109c9ccf3a3SEmmanuel Vadot maxItems: 2 110c9ccf3a3SEmmanuel Vadot clock-names: 111c9ccf3a3SEmmanuel Vadot items: 112c9ccf3a3SEmmanuel Vadot - const: spi 113c9ccf3a3SEmmanuel Vadot - enum: 114c9ccf3a3SEmmanuel Vadot - spi_busclk0 115c9ccf3a3SEmmanuel Vadot - spi_busclk1 116c9ccf3a3SEmmanuel Vadot - spi_busclk2 117c9ccf3a3SEmmanuel Vadot - spi_busclk3 118c9ccf3a3SEmmanuel Vadot 119c9ccf3a3SEmmanuel VadotunevaluatedProperties: false 120c9ccf3a3SEmmanuel Vadot 121c9ccf3a3SEmmanuel Vadotexamples: 122c9ccf3a3SEmmanuel Vadot - | 123c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/exynos5433.h> 124c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/samsung,s2mps11.h> 125c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 126c9ccf3a3SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 127c9ccf3a3SEmmanuel Vadot 128c9ccf3a3SEmmanuel Vadot spi@14d30000 { 129c9ccf3a3SEmmanuel Vadot compatible = "samsung,exynos5433-spi"; 130c9ccf3a3SEmmanuel Vadot reg = <0x14d30000 0x100>; 131c9ccf3a3SEmmanuel Vadot interrupts = <GIC_SPI 433 IRQ_TYPE_LEVEL_HIGH>; 132c9ccf3a3SEmmanuel Vadot dmas = <&pdma0 11>, <&pdma0 10>; 133c9ccf3a3SEmmanuel Vadot dma-names = "tx", "rx"; 134c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 135c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 136c9ccf3a3SEmmanuel Vadot clocks = <&cmu_peric CLK_PCLK_SPI1>, 137c9ccf3a3SEmmanuel Vadot <&cmu_peric CLK_SCLK_SPI1>, 138c9ccf3a3SEmmanuel Vadot <&cmu_peric CLK_SCLK_IOCLK_SPI1>; 139c9ccf3a3SEmmanuel Vadot clock-names = "spi", 140c9ccf3a3SEmmanuel Vadot "spi_busclk0", 141c9ccf3a3SEmmanuel Vadot "spi_ioclk"; 142c9ccf3a3SEmmanuel Vadot samsung,spi-src-clk = <0>; 143c9ccf3a3SEmmanuel Vadot pinctrl-names = "default"; 144c9ccf3a3SEmmanuel Vadot pinctrl-0 = <&spi1_bus>; 145c9ccf3a3SEmmanuel Vadot num-cs = <1>; 146c9ccf3a3SEmmanuel Vadot 147c9ccf3a3SEmmanuel Vadot cs-gpios = <&gpd6 3 GPIO_ACTIVE_HIGH>; 148c9ccf3a3SEmmanuel Vadot 149c9ccf3a3SEmmanuel Vadot audio-codec@0 { 150c9ccf3a3SEmmanuel Vadot compatible = "wlf,wm5110"; 151c9ccf3a3SEmmanuel Vadot reg = <0x0>; 152c9ccf3a3SEmmanuel Vadot spi-max-frequency = <20000000>; 153c9ccf3a3SEmmanuel Vadot interrupt-parent = <&gpa0>; 154c9ccf3a3SEmmanuel Vadot interrupts = <4 IRQ_TYPE_NONE>; 155c9ccf3a3SEmmanuel Vadot clocks = <&pmu_system_controller 0>, 156c9ccf3a3SEmmanuel Vadot <&s2mps13_osc S2MPS11_CLK_BT>; 157c9ccf3a3SEmmanuel Vadot clock-names = "mclk1", "mclk2"; 158c9ccf3a3SEmmanuel Vadot 159c9ccf3a3SEmmanuel Vadot gpio-controller; 160c9ccf3a3SEmmanuel Vadot #gpio-cells = <2>; 161c9ccf3a3SEmmanuel Vadot interrupt-controller; 162c9ccf3a3SEmmanuel Vadot #interrupt-cells = <2>; 163c9ccf3a3SEmmanuel Vadot 164c9ccf3a3SEmmanuel Vadot wlf,micd-detect-debounce = <300>; 165c9ccf3a3SEmmanuel Vadot wlf,micd-bias-start-time = <0x1>; 166c9ccf3a3SEmmanuel Vadot wlf,micd-rate = <0x7>; 167c9ccf3a3SEmmanuel Vadot wlf,micd-dbtime = <0x2>; 168c9ccf3a3SEmmanuel Vadot wlf,micd-force-micbias; 169c9ccf3a3SEmmanuel Vadot wlf,micd-configs = <0x0 1 0>; 170c9ccf3a3SEmmanuel Vadot wlf,hpdet-channel = <1>; 171c9ccf3a3SEmmanuel Vadot wlf,gpsw = <0x1>; 172c9ccf3a3SEmmanuel Vadot wlf,inmode = <2 0 2 0>; 173c9ccf3a3SEmmanuel Vadot 174c9ccf3a3SEmmanuel Vadot wlf,reset = <&gpc0 7 GPIO_ACTIVE_HIGH>; 175c9ccf3a3SEmmanuel Vadot wlf,ldoena = <&gpf0 0 GPIO_ACTIVE_HIGH>; 176c9ccf3a3SEmmanuel Vadot 177c9ccf3a3SEmmanuel Vadot /* core supplies */ 178c9ccf3a3SEmmanuel Vadot AVDD-supply = <&ldo18_reg>; 179c9ccf3a3SEmmanuel Vadot DBVDD1-supply = <&ldo18_reg>; 180c9ccf3a3SEmmanuel Vadot CPVDD-supply = <&ldo18_reg>; 181c9ccf3a3SEmmanuel Vadot DBVDD2-supply = <&ldo18_reg>; 182c9ccf3a3SEmmanuel Vadot DBVDD3-supply = <&ldo18_reg>; 183c9ccf3a3SEmmanuel Vadot SPKVDDL-supply = <&ldo18_reg>; 184c9ccf3a3SEmmanuel Vadot SPKVDDR-supply = <&ldo18_reg>; 185c9ccf3a3SEmmanuel Vadot 186c9ccf3a3SEmmanuel Vadot controller-data { 187c9ccf3a3SEmmanuel Vadot samsung,spi-feedback-delay = <0>; 188c9ccf3a3SEmmanuel Vadot }; 189c9ccf3a3SEmmanuel Vadot }; 190c9ccf3a3SEmmanuel Vadot }; 191