diff --git a/arch/arm64/boot/dts/apple/s800x-6s.dtsi b/arch/arm64/boot/dts/apple/s800x-6s.dtsi index 2730e4e33ae4c9..c5224126cb8b4b 100644 --- a/arch/arm64/boot/dts/apple/s800x-6s.dtsi +++ b/arch/arm64/boot/dts/apple/s800x-6s.dtsi @@ -332,3 +332,71 @@ apple,always-on; apple,manual-pm; }; + +/* + * The cameras (ADT isp), wired the same on the iPhone 6s and 6s Plus and on + * their Samsung and TSMC models. Rails: cam_avdd_ldo pmuL(0x208), + * cam_avdd_gpio AP GPIO 194, cam0_ldo pmuL(0x215). Firmware channel 0 is the + * rear camera (shutdown GPIO 48, clock pad 49, reference clock 0), channel 1 + * the front one (GPIO 52, pad 53, reference clock 1); torch GPIO 74. Each + * model sets its ADT sensor-type as apple,platform-id. + */ +/ { + cam_avdd2: regulator-cam-avdd2 { + compatible = "regulator-fixed"; + regulator-name = "cam-avdd2"; + gpio = <&pinctrl_ap 194 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&i2c0 { + pmic@74 { + cam_avdd: regulator-cam-avdd { + compatible = "apple,antigua-cam-avdd-regulator"; + regulator-name = "cam-avdd"; + }; + + cam0: regulator-cam0 { + compatible = "apple,antigua-cam0-regulator"; + regulator-name = "cam0"; + }; + }; +}; + +&pinctrl_ap { + /* ADT isp function-sensor_extclk and _extclk2 */ + isp_refclk_gpio: isp-refclk-gpio-pins { + pinmux = , + ; + }; + + isp_refclk_f1: isp-refclk-f1-pins { + pinmux = , + ; + }; + + isp_refclk_f2: isp-refclk-f2-pins { + pinmux = , + ; + }; +}; + +&isp { + cam-avdd-supply = <&cam_avdd>; + cam-avdd2-supply = <&cam_avdd2>; + cam0-supply = <&cam0>; + rear-shutdown-gpios = <&pinctrl_ap 48 GPIO_ACTIVE_HIGH>; + front-shutdown-gpios = <&pinctrl_ap 52 GPIO_ACTIVE_HIGH>; + strobe-gpios = <&pinctrl_ap 74 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default", "func1", "func2"; + pinctrl-0 = <&isp_refclk_gpio>; + pinctrl-1 = <&isp_refclk_f1>; + pinctrl-2 = <&isp_refclk_f2>; + firmware-name = "apple/isp-s8000.bin"; + status = "okay"; +}; + +&dart_isp { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/s800x-n66.dtsi b/arch/arm64/boot/dts/apple/s800x-n66.dtsi index c064335deabc6a..fc1b19296097e2 100644 --- a/arch/arm64/boot/dts/apple/s800x-n66.dtsi +++ b/arch/arm64/boot/dts/apple/s800x-n66.dtsi @@ -27,3 +27,13 @@ &wifi0 { brcm,board-type = "apple,pinotnoir"; }; + +/* + * The cameras: ADT isp sensor-type. The 6s Plus adds the rear camera's + * optical stabiliser (ADT has-sphere, function-sphere_buck_mode GPIO 111, + * function-focus_subdev GPIO 47), which the firmware drives; the driver does + * not touch those lines. + */ +&isp { + apple,platform-id = <0x82>; +}; diff --git a/arch/arm64/boot/dts/apple/s800x-n71.dtsi b/arch/arm64/boot/dts/apple/s800x-n71.dtsi index 81b92c4f81a456..e814e103bcfa02 100644 --- a/arch/arm64/boot/dts/apple/s800x-n71.dtsi +++ b/arch/arm64/boot/dts/apple/s800x-n71.dtsi @@ -28,70 +28,7 @@ brcm,board-type = "apple,albarossa"; }; -/* - * The cameras (ADT isp, sensor-type 0x88), the same on the Samsung and TSMC - * models. Rails: cam_avdd_ldo pmuL(0x208), cam_avdd_gpio AP GPIO 194, - * cam0_ldo pmuL(0x215). Firmware channel 0 is the rear camera (shutdown - * GPIO 48, clock pad 49, reference clock 0), channel 1 the front one - * (GPIO 52, pad 53, reference clock 1). - */ -/ { - cam_avdd2: regulator-cam-avdd2 { - compatible = "regulator-fixed"; - regulator-name = "cam-avdd2"; - gpio = <&pinctrl_ap 194 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - -&i2c0 { - pmic@74 { - cam_avdd: regulator-cam-avdd { - compatible = "apple,antigua-cam-avdd-regulator"; - regulator-name = "cam-avdd"; - }; - - cam0: regulator-cam0 { - compatible = "apple,antigua-cam0-regulator"; - regulator-name = "cam0"; - }; - }; -}; - -&pinctrl_ap { - /* ADT isp function-sensor_extclk and _extclk2 */ - isp_refclk_gpio: isp-refclk-gpio-pins { - pinmux = , - ; - }; - - isp_refclk_f1: isp-refclk-f1-pins { - pinmux = , - ; - }; - - isp_refclk_f2: isp-refclk-f2-pins { - pinmux = , - ; - }; -}; - +/* The cameras: ADT isp sensor-type */ &isp { - cam-avdd-supply = <&cam_avdd>; - cam-avdd2-supply = <&cam_avdd2>; - cam0-supply = <&cam0>; - rear-shutdown-gpios = <&pinctrl_ap 48 GPIO_ACTIVE_HIGH>; - front-shutdown-gpios = <&pinctrl_ap 52 GPIO_ACTIVE_HIGH>; - strobe-gpios = <&pinctrl_ap 74 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default", "func1", "func2"; - pinctrl-0 = <&isp_refclk_gpio>; - pinctrl-1 = <&isp_refclk_f1>; - pinctrl-2 = <&isp_refclk_f2>; apple,platform-id = <0x88>; - firmware-name = "apple/isp-s8000.bin"; - status = "okay"; -}; - -&dart_isp { - status = "okay"; };